I got my PDC DVDs in the mail recently, and as such, I have gotten back into the swing
of playing with the new features of ASP.Net. The problem is, there are a few
issues. Of course there are, and I'm not upset about it... it's expected.
However, I'm starting to slowly go mad, as I just don't know which problems are bugs
in the framework, and which problems are bugs in my code.
The most maddening one right now involves the treeview control, which I'm certain
must work somewhat, as I've seen a number of people talking about how to modify the
default behavior. Me? I'd be totally content with the default behavior.
Here's the situation: I've got a master page, and on that master page I have
both a TreeView and a SiteMapPath control. I've also got a SiteMapDataSource,
pointing to the app.sitemap file in the root of my application. Simple drag
& drops, nothing spectacular - that'll come once it all works (hopefully before
2005). The problem is, I get a JavaScript error every time I try to expand or
collapse a branch of the tree.
The error I get is: '_ctl0$tvLeftNav_Data' is undefined
My ASPX source looks like this:
<asp:treeview id=tvLeftNav datasourceid="smdMain" runat="server"
initialexpanddepth="1" />
<asp:sitemapdatasource id=smdMain runat="server"
sitemapviewtype="Tree" />
The resulting related hidden input fields look like this:
<INPUT type=hidden name=_ctl0$tvLeftNav_ExpandState value=ecnnnncnn>
<INPUT type=hidden name=_ctl0$tvLeftNav_SelectedNode>
<INPUT type=hidden name=_ctl0$tvLeftNav_PopulateLog>
Sure enough, the _Data field is missing. So, am I doing something wrong, or
is this just the way it is? Any insight anyone can give would be great... I'm
hoping to get past this before frustration gets the best of me, making me wait for
Beta 1 before trying again.
- G

This
work is licensed under a
Creative
Commons License.