Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET
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
 
 
<asp:UpdatePanel runat="server" ID="pnlSecurityMain">
 
<contenttemplate>
     <asp:PlaceHolder runat="server" ID="plcDynamic">
</contenttemplate>
 

 
 
Codebehind
 
 
if (!node.IsNull())
                {
                    UserControl uc = (UserControl)this.LoadControl(node.UIControlId);
                    uc.ID = "ucDynamicControl";
                    plcDynamic.Controls.Add(uc);
                }
 
 
Thanks in Advance
Amit
Posted 7-Nov-11 21:09pm

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  
v2
Comments
AmitChoudhary10 at 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 at 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)

  Print Answers RSS
0 BillWoodruff 330
1 Mathew Soji 309
2 Maciej Los 295
3 DamithSL 225
4 Afzaal Ahmad Zeeshan 217
0 OriginalGriff 6,369
1 Sergey Alexandrovich Kryukov 5,973
2 DamithSL 5,183
3 Manas Bhardwaj 4,673
4 Maciej Los 4,025


Advertise | Privacy | Mobile
Web01 | 2.8.1411019.1 | Last Updated 8 Nov 2011
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100