Hello - I'm trying to GET the ImageUrl from a treeview node. I can set it OK, but get an empty string when I fetch it. It's also empty to the Locals window.
I wan't the ImageUrl as a poor man's way to determine the type (parent can contain 2 different "types" of nodes ) of node that was expanded. Perhaps there's a better way.
Can anyone confirm that this is a problem with 2005 RC?
Thanks!
protected void ExpandTreeNode(object sender, TreeNodeEventArgs e)
{
string sImage = e.Node.ImageUrl;
// event - add forms
if (sImage.IndexOf("Event") > 0)
{
int iEventID = Convert.ToInt32(e.Node.Value.ToString());
//fetch forms
DataSet ds = Evt.DB_DAL.evt_reg_tree_forms_select(iEventID);
//add level 1 relationship nodes
foreach (DataRow row in ds.Tables[0].Rows)
{
string sNodeText = " " +
row[
"caption"].ToString() + " (" +
row[
"reg_count"].ToString() + ")";
addTreeNode(e.Node, sNodeText, sNodeText,
"Form.gif", true);
}
}
}