Refresh User Control without Refreshing the Page
Posted
by Shrewdy
on Stack Overflow
See other posts from Stack Overflow
or by Shrewdy
Published on 2010-03-31T11:08:59Z
Indexed on
2010/03/31
11:13 UTC
Read the original article
Hit count: 564
hi,
I have a page and on that page i have a button and a user control. I want to refresh the user control without refreshing the page.
I know i cannot do it otherwise so i did is... (wrapped my user control inside the Update Panel.)
<asp:TextBox ID="txtName" runat="server"></asp:TextBox><br />
<asp:Button ID="btnAdd" runat="server" Text="Add name to list" OnClick="btnAdd_Click" /><br /><br />
<asp:UpdatePanel ID="upShowNames" runat="server">
<ContentTemplate>
<uc1:ShowNames ID="ucShowNames" runat="server" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnAdd" />
</Triggers>
</asp:UpdatePanel>
but i still the control wont refresh. i also tried calling the update panels .Update() method by changing its UpdateMode to Conditional but that does not work either...
does any one know how can we do it then...
any help will be greatly appreciated....thank you!!
© Stack Overflow or respective owner