Sometimes, there are cases when you need to do it. It's an easy task to understand and to perform too.
- Place an UpdatePanel on the Page and set the UpdateMode property of the UpdatePanel as "Conditional".
<asp:UpdatePanel ID="UpdatePanelDemo" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<div id="divDemo" runat="server" style="width: 400px; height: 200px; background-color: Gray;
border-radius: 10px; color: White; text-align: center; font-size: 30px; font-family: Calibri;
display: table-cell; vertical-align: middle;">
Hi Folks
</div>
</ContentTemplate>
</asp:UpdatePanel>
Note: Don't forget to add an <asp:ScriptManager> tag.
- Add a Button in Web User Control and add a OnClick handler.
- Place the Web User Control on the page. Switch to the Design Mode (Shift + F7) -> Select Control from Solution Explorer -> Perform Drag & Drop (on page).
Now switch to Source (F7); you will see that the control is registered on the page (just after the Page directive) and also placed.
<%@RegisterSrc="Controls/WebUserControl.ascx"TagName="WebUserControl"TagPrefix="uc1" %>
I have placed it after the Update Panel, but it could be placed anywhere on the page (but inside the form).



shreeniwas kushwahPosted Aug 21, 2012, 9:02 AM
excellent dude