K
kw
I've spent all week trying various workarounds and keep coming back this
bug, but I just don't understand what the problem is.
An ASPX defines a control:
<%@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls"
Assembly="Microsoft.Web.UI.WebControls, Version=1.0.2.226, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" %>
<html><body ><form id=Form1 method=post runat="server">
<iewc:treeview id=TreeViewControl runat="server" AutoPostBack="True"
SelectExpands="True">
<iewc:TreeNode Text="Jobs" ID="Jobs"></iewc:TreeNode>
..etc.
Fine so far, right?
The codebehind .cs has this line:
protected Microsoft.Web.UI.WebControls.TreeView TreeViewControl;
And on loading the aspx:
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
//CRASH on next line [NULLREFERENCEEXCEPTION], TreeViewControl is
<undefined>
this.TreeViewControl.SelectedIndexChange += new
Microsoft.Web.UI.WebControls.SelectEventHandler(this.TreeViewControl_Selecte
dIndexChange);
Will someone PLEASE explain what is going wrong? This seems pretty
straightforward but it just doesn't work!
Thanks a zillion!
Dan
bug, but I just don't understand what the problem is.
An ASPX defines a control:
<%@ Register TagPrefix="iewc" Namespace="Microsoft.Web.UI.WebControls"
Assembly="Microsoft.Web.UI.WebControls, Version=1.0.2.226, Culture=neutral,
PublicKeyToken=31bf3856ad364e35" %>
<html><body ><form id=Form1 method=post runat="server">
<iewc:treeview id=TreeViewControl runat="server" AutoPostBack="True"
SelectExpands="True">
<iewc:TreeNode Text="Jobs" ID="Jobs"></iewc:TreeNode>
..etc.
Fine so far, right?
The codebehind .cs has this line:
protected Microsoft.Web.UI.WebControls.TreeView TreeViewControl;
And on loading the aspx:
private void InitializeComponent()
{
this.Load += new System.EventHandler(this.Page_Load);
//CRASH on next line [NULLREFERENCEEXCEPTION], TreeViewControl is
<undefined>
this.TreeViewControl.SelectedIndexChange += new
Microsoft.Web.UI.WebControls.SelectEventHandler(this.TreeViewControl_Selecte
dIndexChange);
Will someone PLEASE explain what is going wrong? This seems pretty
straightforward but it just doesn't work!
Thanks a zillion!
Dan