The postings on this site are my own and do not represent my Employer's positions, advice or strategies.

LifeAsBob - Blog

 

Home

No Ads ever, except search!
Friday, April 26, 2024 Login
Public

Giving up on the ASP.NET Treeview 10/3/2008 1:38:48 PM

The controls with asp.net are great, some of us can remember programing in asp and request.response, but asp.net has been great....with the exception of the asp.net treeview.

I've tried using this thing off and on for months, really digging in recently and have come to the conclusion, that I am better off creating my own treeview control.

I think for simple requirements the treeview control works great, but my requirements were to create a dynamically driven treeview loaded from a database as each node is clicked.  Somehow this just causes the treeview control to loose it's brain, viewstate and postbacks didn't work, slowly I began building up so many hacks to make it work, that I just couldn't believe it.  You have to know when to give up, and I was there.

I created my own tree view for my knowledge base, and it's located here:  http://www.lifeasbob.com/code/kb_articles.aspx.

It uses a combination of post backs and query strings to manipulate and display articles, search them too (though I need to work on that some more), also for me I have the ability to add, edit and delete them off the treeview.

I feel very satisfied with my own version of the treeview, as I understand everything about it and don't have to worry about the voodoo asp.net treeview control loosing state and the myriad of other issues I ran into.  I tried many of the websites below for help, and they were great, but ultimately the damn thing still didn't work, mine does, code done.

http://www.mredkj.com/vbnet/scriptCallback.html

http://aspalliance.com/732 

http://www.dotnetjunkies.com/Article/E80EC96F-1C32-4855-85AE-9E30EECF13D7.dcik 

http://www.bulahema.com/en/aspnet20treeviewwithoutpostbacksolved


Blog Home