10,000 Monkeys - Harnessing the Power of Typing Monkeys

America's 2,672,401st Most Read Blog by Kevin Marshall.
in

ASP.NET 2005 Annoyances #00003 - Treeviews and Sitemaps with Cookieless Sessions

I hate cookieless sessions.  I don't really have many good reasons.  Perhaps its the eye sore of a url that gets put in the browser.  Or maybe its the fact that they break the treeview control.  Is it too much to ask that the treeview would be smart enough to generate links with the 2054 character session id in there?

One way to fix this is to add a handler for the NodeDataBound event of the treeview control.

protected void treeNode_OnNodeDataBound(object sender, TreeNodeEventArgs e)
{
   e.Node.NavigateUrl = Response.ApplyAppPathModifier(e.Node.NavigateUrl);
}
Posted: Mar 28 2006, 10:21 AM by kmarshall | with no comments
Filed under:

Comments

No Comments

Leave a Comment

(required) 

(required) 

(optional)

(required)