S
Sohail
Hey guys,
I havent been in ASP.NET for a while so I may just have
forgotten how to do this.
I have a treeview of which I'm trying to get the selected
node on a postback (i.e., server side). For some reason it
is always coming out as 0. Is there some property I have
to set here? Here is the code:
private void Page_Load(object sender, System.EventArgs e)
{
if (!IsPostBack)
{
Stream s = Database.RunXmlStoredProcedure
(DSN.DSN_ENVISION, "sp_DOT_ExportTool_DBSchemaAsTreeViewXml
",new string[0],new object[0],"TREENODES");
StreamReader sr = new StreamReader(s);
s.Position = 0;
dbSchema.TreeNodeSrc = sr.ReadToEnd();
dbSchema.DataBind();
}
}
private void btnSelect_Click(object sender,
System.EventArgs e)
{
// this method is purely to test selectedindex
pnlSchema.Visible = false;
Response.Write(dbSchema.SelectedNodeIndex);
}
Any help would be appreciated
Thanks,
Sohail
I havent been in ASP.NET for a while so I may just have
forgotten how to do this.
I have a treeview of which I'm trying to get the selected
node on a postback (i.e., server side). For some reason it
is always coming out as 0. Is there some property I have
to set here? Here is the code:
private void Page_Load(object sender, System.EventArgs e)
{
if (!IsPostBack)
{
Stream s = Database.RunXmlStoredProcedure
(DSN.DSN_ENVISION, "sp_DOT_ExportTool_DBSchemaAsTreeViewXml
",new string[0],new object[0],"TREENODES");
StreamReader sr = new StreamReader(s);
s.Position = 0;
dbSchema.TreeNodeSrc = sr.ReadToEnd();
dbSchema.DataBind();
}
}
private void btnSelect_Click(object sender,
System.EventArgs e)
{
// this method is purely to test selectedindex
pnlSchema.Visible = false;
Response.Write(dbSchema.SelectedNodeIndex);
}
Any help would be appreciated
Thanks,
Sohail