Click here to Skip to main content
15,914,905 members
Home / Discussions / ASP.NET
   

ASP.NET

 
GeneralRe: Browse Capabilities Pin
Vasudevan Deepak Kumar9-Mar-08 22:21
Vasudevan Deepak Kumar9-Mar-08 22:21 
Questiontime come down Pin
mnalammwb9-Mar-08 21:25
mnalammwb9-Mar-08 21:25 
GeneralRe: time come down Pin
Vasudevan Deepak Kumar9-Mar-08 22:23
Vasudevan Deepak Kumar9-Mar-08 22:23 
QuestionJavascript Ajax with ASP.NET problem Pin
dipak.dipak9-Mar-08 21:17
dipak.dipak9-Mar-08 21:17 
GeneralUsing tor to connect with different ip each time Pin
metallica_rock109-Mar-08 21:06
metallica_rock109-Mar-08 21:06 
GeneralRe: Using tor to connect with different ip each time Pin
N a v a n e e t h9-Mar-08 21:13
N a v a n e e t h9-Mar-08 21:13 
GeneralRe: Using tor to connect with different ip each time Pin
Vasudevan Deepak Kumar9-Mar-08 22:24
Vasudevan Deepak Kumar9-Mar-08 22:24 
Questionhow to poulate data from database in treeview?? Pin
biswa479-Mar-08 21:02
biswa479-Mar-08 21:02 
Hai frinedz,i want to populate data from Database in hirachary manner.
i have done up to 2level. but i dont know how to add one subchild in
the child node...can u plz do this with my existing code...
or tell me where should i add the code to a sub child under the child node.

here the parent node is -modulename
child node - componentname
& subchild node- function name.
in the sqlcommand you can put any sql....for ur conviennet .later on iwill change it according to my requirment.
plz do this favour on me.
i am using asp.net along with c# 2005 as front end and backend as sqlserver2005 as db

below i am giving u my code also..
======================================
<br />
 protected void Page_Load(object sender, EventArgs e)<br />
   {<br />
        if (!IsPostBack)<br />
       {<br />
           PopulateRootLevel();<br />
       }<br />
}<br />
<br />
void PopulateRootLevel()<br />
   {<br />
<br />
       SqlConnection SqlCon = new SqlConnection("Data<br />
Source=biswa;Initial Catalog=rwsNew;User ID=sa;Password=biswa007");<br />
       // SqlConnection SqlCon = new SqlConnection("Data<br />
Source=;Initial Catalog=rwsNew;User ID=;Password=");<br />
       SqlCon.Open();<br />
       SqlCommand SqlCmd = new SqlCommand("SELECT modulename,moduleid<br />
FROM module_master WHERE delflag='ACTIVE' ORDER BY modulename ",<br />
SqlCon);<br />
       SqlDataReader Sdr = SqlCmd.ExecuteReader();<br />
       SqlCmd.Dispose();<br />
       string[,] ParentNode = new string[100, 2];<br />
       int count = 0;<br />
       while (Sdr.Read())<br />
       {<br />
           ParentNode[count, 0] =<br />
Sdr.GetValue(Sdr.GetOrdinal("moduleid")).ToString();<br />
           ParentNode[count++, 1] =<br />
Sdr.GetValue(Sdr.GetOrdinal("modulename")).ToString();<br />
       }<br />
       Sdr.Close();<br />
       for (int loop = 0; loop < count; loop++)<br />
       {<br />
           TreeNode root = new TreeNode();<br />
           root.Text = ParentNode[loop, 1];<br />
           root.Target = "_blank";<br />
           //root.NavigateUrl = "Default.aspx";<br />
           SqlCommand Module_SqlCmd = new SqlCommand("SELECT<br />
compid,componentname FROM module_component WHERE (moduleid = '" +<br />
ParentNode[loop, 0] + "') ", SqlCon);<br />
           SqlDataReader Module_Sdr = Module_SqlCmd.ExecuteReader();<br />
           while (Module_Sdr.Read())<br />
           {<br />
               TreeNode child = new TreeNode();<br />
               child.Text =<br />
Module_Sdr.GetValue(Module_Sdr.GetOrdinal("componentname")).ToString();<br />
               child.Target = "_blank";<br />
               //child.NavigateUrl = "Default.aspx";<br />
               root.ChildNodes.Add(child);<br />
           }<br />
           Module_Sdr.Close();<br />
           TvMenu.Nodes.Add(root);<br />
       }<br />
<br />
       TvMenu.CollapseAll();<br />
       SqlCon.Close();<br />
   }<br />



thanks in advance Smile | :)
Generalweb.cofig Pin
John.L.Ponratnam9-Mar-08 19:58
John.L.Ponratnam9-Mar-08 19:58 
GeneralRe: web.cofig Pin
Laddie9-Mar-08 20:06
Laddie9-Mar-08 20:06 
GeneralRe: web.cofig Pin
John.L.Ponratnam9-Mar-08 20:11
John.L.Ponratnam9-Mar-08 20:11 
GeneralRe: web.cofig Pin
Laddie9-Mar-08 20:15
Laddie9-Mar-08 20:15 
GeneralRe: web.cofig Pin
meghamaharshi9-Mar-08 20:28
meghamaharshi9-Mar-08 20:28 
GeneralTextbox with a dropdownlist custom control Pin
Reddy Prakash9-Mar-08 19:05
Reddy Prakash9-Mar-08 19:05 
GeneralRe: Textbox with a dropdownlist custom control Pin
Christian Graus9-Mar-08 19:08
protectorChristian Graus9-Mar-08 19:08 
GeneralRe: Textbox with a dropdownlist custom control Pin
Reddy Prakash9-Mar-08 19:15
Reddy Prakash9-Mar-08 19:15 
GeneralRe: Textbox with a dropdownlist custom control Pin
Christian Graus9-Mar-08 19:32
protectorChristian Graus9-Mar-08 19:32 
GeneralRe: Textbox with a dropdownlist custom control Pin
Laddie9-Mar-08 20:03
Laddie9-Mar-08 20:03 
Questionhow to determine if a datagrid has any data using a custom validator? Pin
lakshmichawala9-Mar-08 18:54
lakshmichawala9-Mar-08 18:54 
AnswerRe: how to determine if a datagrid has any data using a custom validator? Pin
Christian Graus9-Mar-08 19:34
protectorChristian Graus9-Mar-08 19:34 
AnswerRe: how to determine if a datagrid has any data using a custom validator? Pin
M LN Rao9-Mar-08 20:03
M LN Rao9-Mar-08 20:03 
GeneralUpdate Panel for GridView in ASP.NET2.0 Pin
salon9-Mar-08 17:57
salon9-Mar-08 17:57 
GeneralRe: Update Panel for GridView in ASP.NET2.0 Pin
Ravenet9-Mar-08 18:00
Ravenet9-Mar-08 18:00 
GeneralRe: Update Panel for GridView in ASP.NET2.0 Pin
salon9-Mar-08 18:30
salon9-Mar-08 18:30 
GeneralRe: Update Panel for GridView in ASP.NET2.0 Pin
Ravenet9-Mar-08 18:40
Ravenet9-Mar-08 18:40 

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.