Last post Sep 18, 2006 05:05 PM by MrPimp
Sep 14, 2006 03:30 PM|MrPimp|LINK
I'm trying to port to Visual Studio 2005 (VS2005) a web site that was developped in VS2003. At first, VS told me upon compilation that the «treeview» element was unknown. After searching a bit in the forums, I've tried including a copy of the «webctrl_client»
folder in my working folder, in my «inetpub\wwwroot» folder, and in my site's root. Now, it's the «TreeNode» element that is unknown!
The original site used to populate the treeview control with localised texts and urls with data from a SQL Server DB, but all that shows is plain text with no functionality whatsoever. I thought it might be DB connectivity problem, so I tried putting literal
TreeNode declaration in the aspx file, and I get the same problem (just non-functional, literal text, and the mention that the treenode element is unknown...)
Could this have anything to do with client script registration (
ClientScript.RegisterClientScriptBlock(type type, string key,
string script) ?)
I'm not quite sure about that method's signature; the type arg, for instance, what type is it supposed to be (the type of what?) And the string
key, what does it represent?
Any insight will be welcome as I'm new to ASP.NET 2.0 (and to ASP.NET, in fact).
I'm using Microsoft.IE.WebControls (ver. 126.96.36.199) and Visual Studio 2005 Professional Edition (8.0.50727.42)
Thanks for your assistance!
Sep 14, 2006 04:51 PM|StrongTypes|LINK
Sep 14, 2006 05:13 PM|MrPimp|LINK
Yeah, I was about to embark on that journey, but I thought I'd ask first, since I only have to convert that site to include in one of our apps as an exemple on how to deliver tutorial videos to our clients...
I hoped I would be able to avoid that meddling with the site... :(
Thanks anyhow for your time.
Sep 18, 2006 03:34 PM|MrPimp|LINK
Well, thanks for the tip, StrongTypes, I followed it finally. I replaced the web Controls' Treeview with the one from .Net 2.0. It (nearly) works fine, now.
The problem I have is I'd like to have nodes with children expand/collapse automatically when clicked on.
I nearly solved it by adding a call to ToggleExpandCollapse in the TreeView_selectedNodeChanged event handler. The only problem is, if a user repeatedly click on the same node, the event only gets fired the first time. There doesn't seem to be a click
event for either the TreeNode, nor the TreeView Class, any workaround?
As always, any insight is welcome
Sep 18, 2006 04:48 PM|StrongTypes|LINK
Sep 18, 2006 05:05 PM|MrPimp|LINK