Reputation: 13
I have two user controls on a page - UC1,UC2. Each usercontrol have a asp:button. Now if I click the any of the buttons the page post back. Now if I click the button of UC1 then the following happen.
Now if user click on the UC1 button, I do not want to load the view state of UC2 user controls at server because the viewstate of UC2 is large. The execution of UC1 is not dependent of UC2.
Please suggest how can I achive this.
Thanks!
Upvotes: 0
Views: 476
Reputation: 7121
What it sounds like your asking for is the ability to do partial postbacks. That is postbacks that only affect a portion of the page. There are a number of ways to accomplish this such as using the Microsoft provided AJAX controls (http://www.asp.net/ajax) or rolling your own with JQuery and web methods (this method however is stateless and should be expected as such). Specifically you will want to look at UpdatePanels and PostBack Triggers.
Hope this helps.
Upvotes: 2