As the conditional mode, you should call the updatepanel to update it, like
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
Label1.Text = TextBox1.Text & txtpwd.Text
UpdatePanel1.Update()
End Sub
In order to avoid the Textbox from clearing, you can try to move txtpwd in the parent updatepanel and move the Button1 and other controls in the child updatepanel at first. Then set the UpdateMode as Conditional in the parent updatepanel as follows:
Darani
Member
18 Points
32 Posts
MULTIPLE UPDATE PANEL
Nov 20, 2012 12:51 PM|LINK
</asp:ScriptManager> <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:Button ID="Button1" runat="server" Text="Button" /> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:TextBox ID="txtpwd" runat="server" TextMode="Password"></asp:TextBox> <asp:PasswordStrength ID="PasswordStrength1" runat="server" TargetControlID="txtpwd"> </asp:PasswordStrength> </ContentTemplate> </asp:UpdatePanel> </ContentTemplate> </asp:UpdatePanel>Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click Label1.Text = TextBox1.Text & txtpwd.Text End Sub<div></div>Mudasir.Khan
All-Star
15346 Points
3142 Posts
Re: MULTIPLE UPDATE PANEL
Nov 20, 2012 01:07 PM|LINK
try moving the button into the same contentTemplate so it will be
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label> <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:TextBox ID="txtpwd" runat="server" TextMode="Password"></asp:TextBox> <asp:PasswordStrength ID="PasswordStrength1" runat="server" TargetControlID="txtpwd"> </asp:PasswordStrength> <asp:Button ID="Button1" runat="server" Text="Button" /> </ContentTemplate> </asp:UpdatePanel> </ContentTemplate> </asp:UpdatePanel>Mastan Oli
Contributor
5100 Points
999 Posts
Re: MULTIPLE UPDATE PANEL
Nov 20, 2012 01:09 PM|LINK
As the conditional mode, you should call the updatepanel to update it, like
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click Label1.Text = TextBox1.Text & txtpwd.Text UpdatePanel1.Update() End SubplayingOOPS | மெய்ப்பொருள் காண்பதறிவு
Mark as Answer If you find helpful
Darani
Member
18 Points
32 Posts
Re: MULTIPLE UPDATE PANEL
Nov 20, 2012 01:42 PM|LINK
still the same problem exist
Darani
Member
18 Points
32 Posts
Re: MULTIPLE UPDATE PANEL
Nov 20, 2012 01:43 PM|LINK
i want to implement multiple panel. this is my trial for my other work
chetan.sarod...
All-Star
66639 Points
11275 Posts
Re: MULTIPLE UPDATE PANEL
Nov 21, 2012 02:33 AM|LINK
Refer this similar threads -
http://forums.asp.net/p/1447465/3296639.aspx
Senior Software Engineer,
Approva Systems Pvt Ltd, Pune, India.
Catherine Sh...
All-Star
23382 Points
2490 Posts
Microsoft
Re: MULTIPLE UPDATE PANEL
Nov 23, 2012 07:23 AM|LINK
Hi,
In order to avoid the Textbox from clearing, you can try to move txtpwd in the parent updatepanel and move the Button1 and other controls in the child updatepanel at first. Then set the UpdateMode as Conditional in the parent updatepanel as follows:
In the .aspx
<asp:ScriptManager ID="ScriptManager1" runat="server"> </asp:ScriptManager> <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"> <ContentTemplate> <asp:TextBox ID="txtpwd" runat="server" TextMode="Password"></asp:TextBox> <asp:UpdatePanel ID="UpdatePanel2" runat="server"> <ContentTemplate> <asp:Button ID="Button2" runat="server" Text="Button" OnClick="Button2_Click" /> <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox> <asp:Label ID="Label3" runat="server" Text="Label"></asp:Label> </ContentTemplate> </asp:UpdatePanel> </ContentTemplate> </asp:UpdatePanel>In the .cs
protected void Button2_Click(object sender, EventArgs e) { Label3.Text = TextBox1.Text + txtpwd.Text; }Best wishes,
Feedback to us
Develop and promote your apps in Windows Store