Click here to Skip to main content
15,919,245 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi I am stuck in a problem...I need to verify if is ispostback and if it is i need to hide the items i am doing that in code behind but i can hide just clear:

Code behind:
C#
if (IsPostBack == true)
            {
                TreeView1.Nodes.Clear();
                TreeView1.Nodes.Add(node_value);
            }



Jquery:

$("#TreeView").live(function() {

});
Posted

1 solution

You can't really tell if it's PostBack or not just using jQuery. What you can do is use the ClientScriptManager to write a jQuery script to the page on PostBack:

http://msdn.microsoft.com/en-us/library/system.web.ui.clientscriptmanager.aspx[^]

Specifically using this method:

http://msdn.microsoft.com/en-us/library/btf44dc9.aspx[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900