Summary:
When running from Visual Studio 2005 in debug mode. A page with a WebDataTree doing a NodePopulate event will always call the Default.aspx's Page_Load event (and that IsPostBack value of the Default.aspx page will be false).
Steps to reproduce the problem:
I have supplied two forms - MyStartPage.aspx and Default.aspx.
In visual studio 2005, I put a break point on the line arbitrary line
Label1.Text=DateTime.Now.ToString();
in the Page_Load event (in the Default page), and when looking at MyStartPage, that line will always be executed.
A few other things tried: (but not in code below)
1) I've taken the ScriptManager off of the Default page, but no change.
2) I have even added a button to the MyStartPage. When it is pressed, I get the same result, but not if I take the WebDataTree off of the page.
3) On Default page, I set AutoEventWireup="false". Then manually wired the event within the Default classes constructor:
public _Default()
{
Load += new EventHandler(Page_Load);
}
4) I have Changed the name of the class from _Default to _myDefault, but no change. (But if I change the filename from Default.aspx to something else, then it stops the problem)
Sample Code:
// --------------------------- MyStartPage.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="MyStartPage.aspx.cs" Inherits="MyStartPage" %>
<%@ Register Assembly="Infragistics2.Web.v9.1, Version=9.1.20091.1015, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb"
Namespace="Infragistics.Web.UI.NavigationControls" TagPrefix="ig" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>Untitled Page</title>
</head>
<body>
<form id="form1" runat="server">
</ig:WebDataTree>
</form>
</body>
</html>
// --------------------------- MyStartPage.aspx.cs
using System;
using Infragistics.Web.UI.NavigationControls;
public partial class MyStartPage : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)
if (!IsPostBack)
PopulateTheNode(WebDataTree1.Nodes);
protected void WebDataTree1_NodePopulate(object sender, Infragistics.Web.UI.NavigationControls.DataTreeNodeEventArgs e)
PopulateTheNode(e.Node.Nodes);
public void PopulateTheNode(DataTreeNodeCollection nodes)
DataTreeNode ndNew = new DataTreeNode();
ndNew.Text = "Root";
ndNew.IsEmptyParent = true;
nodes.Add(ndNew);
// --------------------------- Default.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<head id="Head1" runat="server">
<asp:ScriptManager ID="ScriptManager2" runat="server">
</asp:ScriptManager>
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
// --------------------------- Default.aspx.cs
public partial class _Default : System.Web.UI.Page
Hey,
So, I looked at your code and noticed that you are still using the RTM version. This problem sounds almost identical to a bug that was submitted and fixed after the release in the tree. If you could try updating to the latest service release and try again, the problem might disappear. If it doesn't, we will investigate further.
regards,
David Young
Hi David,
So, what indicated to you in the code that I had an RTM version?
Charles
Charles,
As Angel indicated, it is the fact that your build number is 1015. We have full numbers of 9.1.20091.xxxx for the 9.1 release. Basically stands for the first release of 2009. When we initially release to the public, we have a build number (the xxxx) that starts with 1000. As any little problems are ironed out right before release, that number can go up a tad, in this case to 1015. Any subsequent service releases start with build number 2000 and above. These address any bugs that couldn't be put into the release or that are found by customers and reported to us. July is our latest Service Release, with build number 2067 I believe. We should be releasing our August Service Release soon. So try this out and let us know if the problem persists.
-Dave
Hi Dave,
That all makes sense. I'd like to clarify some terminology though. My confusion came from the term RTM which I take to meen 'Release To Manfufacturing' which would come prior to a general public or consumer release. An RTM may or may not turn into the general realease. I think what I have here is just the initial release but without any service packs.
I think you got it. When I was saying RTM, I mean Release to Market. So a little confusion. But yest, 1015 was the initial release available to the public. You'll just need to get a service park.