.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

TreeViewcontrol and OnBeforeUnload

Posted By:      Posted Date: September 28, 2010    Points: 0   Category :ASP.Net


I need help on this.

In one of my applications, i created the left navigation menu using treeviewcontrol.  Each and every node in the treeview is calling a URL in the application.

Content pages are dynamically created ASP.NET controls. 

There is no submit or save buttons in these pages.  When the user finished entering the data and go to another link in the tree structure, the data need to be saved in the database and go to the next link.

I tried this using OnBeforeUnload and Document.form1.submit,  the aspnet form is not submitting, so there is no postback. I also tried __dopostback method call from the javascript. Still not able to get it working.

I appreciate any help


View Complete Post

More Related Resource Links

Custom Message onbeforeunload event.


Hello All,


I need to prompt user when he/she leave from page without save changes.

I had achieved that thing but the problem is that

it displays it own message I need to display my message only.

So I have used onbeforeunload event in javascript.

Please give me snip code if possible so that I can find solution easily.


The Code that I had written is,


function SetDirty() {




window.onbeforeunload = closeIt;

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend