Click here to Skip to main content
16,021,285 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I have a menu control on master page. On clicking any of the menu items, I am loading a user control on content page(Default.aspx) of master page.
I have used Update Panel and a Place holder inside on which i am loading the User Control.

The issue is that whenever i load the User Control, Whole page postbacks instead of the part within Update Panel.

How should i achieve partial postbacks on every menu item click instead of whole page postbacks.

Default.aspx

C#
<asp:UpdatePanel runat="server" ID="pnlSecurityMain">

<contenttemplate>
     <asp:PlaceHolder runat="server" ID="plcDynamic">
</contenttemplate>


Codebehind

C#
if (!node.IsNull())
                {
                    UserControl uc = (UserControl)this.LoadControl(node.UIControlId);
                    uc.ID = "ucDynamicControl";
                    plcDynamic.Controls.Add(uc);
                }


Thanks in Advance
Amit
Posted

1 solution

 
Share this answer
 
v2
Comments
AmitChoudhary10 8-Nov-11 3:27am    
I already have Update Panel in all my UserControl's, which is working fine and handles all the postbacks once the control is loaded.
AmitChoudhary10 8-Nov-11 3:29am    
The links does'nt go with my scenario. My menu items are on the Master page and not on the page on which i am Loading the User Control

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