Click here to Skip to main content
12,073,325 members (67,665 online)
Rate this:
 
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 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)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web04 | 2.8.160208.1 | Last Updated 8 Nov 2011
Copyright © CodeProject, 1999-2016
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