Click here to Skip to main content
15,891,718 members
Home / Discussions / C#
   

C#

 
AnswerRe: Timer doesn´t work by Server and Client! Pin
Alan N25-Aug-09 6:21
Alan N25-Aug-09 6:21 
Question[Message Deleted] Pin
Ajithevn21-Aug-09 22:35
Ajithevn21-Aug-09 22:35 
AnswerRe: click event of a selected date in c# Pin
Vimalsoft(Pty) Ltd21-Aug-09 23:19
professionalVimalsoft(Pty) Ltd21-Aug-09 23:19 
Questionproblem with fileupload.hasfile Pin
Priyagdpl21-Aug-09 21:44
Priyagdpl21-Aug-09 21:44 
AnswerRe: problem with fileupload.hasfile Pin
Xmen Real 21-Aug-09 23:18
professional Xmen Real 21-Aug-09 23:18 
Questionneed PulsAll in locked section? Pin
elvis_pan21-Aug-09 21:35
elvis_pan21-Aug-09 21:35 
AnswerRe: need PulsAll in locked section? Pin
Saksida Bojan21-Aug-09 21:56
Saksida Bojan21-Aug-09 21:56 
QuestionLink in Dynamic menu Pin
rummer21-Aug-09 20:33
rummer21-Aug-09 20:33 
I have create a dynamic menu but problem is that how we give for a page link in clildnodes.

my code is attached in code block-
using System;

using System.Data;

using System.Configuration;

using System.Collections;

using System.Web;

using System.Web.Security;

using System.Web.UI;

using System.Web.UI.WebControls;

using System.Web.UI.WebControls.WebParts;

using System.Web.UI.HtmlControls;

using System.Data.SqlClient; 



public partial class top : System.Web.UI.Page

{

SqlConnection conn;

DataUtility dut = new DataUtility();

protected void Page_Load(object sender, EventArgs e)

{

PopulateMenu();

}



private void PopulateMenu()

{

DataSet ds = GetDataSetForMenu();

Menu menu = new Menu();

menu.MenuItemClick += new MenuEventHandler(menu_MenuItemClick);

foreach (DataRow parentItem in ds.Tables[0].Rows)

{

MenuItem categoryItem = new MenuItem((string)parentItem["Catname"]);

menu.Items.Add(categoryItem);

foreach (DataRow childItem in parentItem.GetChildRows("Children"))

{

MenuItem childrenItem = new MenuItem((string)childItem["Subcatname"]);

categoryItem.ChildItems.Add(childrenItem);

}

}

Panel1.Controls.Add(menu);

Panel1.DataBind();

}

void menu_MenuItemClick(object sender, MenuEventArgs e)

{

string selected = e.Item.Text;

Response.Write(selected);

}

private DataSet GetDataSetForMenu()

{

conn = dut.getConnection();

SqlDataAdapter adCat = new SqlDataAdapter("SELECT tbl_Category.* FROM tbl_Category,tbl_Usercat where tbl_usercat.uid=1 and tbl_Category.sno=tbl_Usercat.catid", conn);

SqlDataAdapter adProd = new SqlDataAdapter("SELECT tbl_SubCategory.* FROM tbl_SubCategory,tbl_UserSubcat where tbl_UserSubcat.UID=1 and tbl_SubCategory.sno=tbl_UserSubcat.SubCatid", conn);

DataSet ds = new DataSet();

adCat.Fill(ds, "tbl_Category");

adProd.Fill(ds, "tbl_SubCategory");

ds.Relations.Add("Children", ds.Tables["tbl_Category"].Columns["sno"], ds.Tables["tbl_SubCategory"].Columns["CatID"]);

return ds;

}

}



so plz help me soon.

thanks

vivek
AnswerRe: Link in Dynamic menu Pin
Saksida Bojan21-Aug-09 20:49
Saksida Bojan21-Aug-09 20:49 
Questionproblem reading an Excel file Pin
VCsamir21-Aug-09 20:17
VCsamir21-Aug-09 20:17 
AnswerRe: problem reading an Excel file Pin
Suresh Suthar21-Aug-09 20:39
professionalSuresh Suthar21-Aug-09 20:39 
QuestionLink in Dynamic menu Pin
rummer21-Aug-09 19:18
rummer21-Aug-09 19:18 
AnswerRe: Link in Dynamic menu [modified] Pin
Saksida Bojan21-Aug-09 19:47
Saksida Bojan21-Aug-09 19:47 
QuestionHow to source code c++ language modify to with XML in c# ? Pin
bolly12521-Aug-09 17:55
bolly12521-Aug-09 17:55 
AnswerRe: How to source code c++ language modify to with XML in c# ? Pin
Saksida Bojan21-Aug-09 19:38
Saksida Bojan21-Aug-09 19:38 
QuestionChecking a webpage doesn't redirect [modified] Pin
craigchrist823921-Aug-09 15:22
craigchrist823921-Aug-09 15:22 
AnswerRe: Checking a webpage doesn't redirect Pin
Saksida Bojan21-Aug-09 19:55
Saksida Bojan21-Aug-09 19:55 
QuestionGet the underlying combo of a datagridviewcomboboxcolumn Pin
baranils21-Aug-09 10:04
baranils21-Aug-09 10:04 
AnswerRe: Get the underlying combo of a datagridviewcomboboxcolumn Pin
Henry Minute21-Aug-09 10:18
Henry Minute21-Aug-09 10:18 
GeneralRe: Get the underlying combo of a datagridviewcomboboxcolumn Pin
baranils21-Aug-09 10:41
baranils21-Aug-09 10:41 
GeneralRe: Get the underlying combo of a datagridviewcomboboxcolumn Pin
baranils21-Aug-09 11:21
baranils21-Aug-09 11:21 
Questionrun a function before exiting a web application Pin
JohnQuar121-Aug-09 8:58
JohnQuar121-Aug-09 8:58 
AnswerRe: run a function before exiting a web application Pin
xstoneheartx21-Aug-09 9:26
xstoneheartx21-Aug-09 9:26 
Questioncan not copy database files Pin
msrezapro21-Aug-09 8:16
msrezapro21-Aug-09 8:16 
AnswerRe: can not copy database files Pin
xstoneheartx21-Aug-09 9:38
xstoneheartx21-Aug-09 9:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.