Hello,
I've created a panel ("Panel1") with a textbox ("TextBox1") inside it.
Outside "Panel1" I have a button ("Button1")
I also have a "Panel2" with a label ("Label2") inside it
When the text in TextBox1 changes, I want to update "Label2"/ "Panel2", WITHOUTupdating "Panel1"
When "Button1" is clicked, I want to update "Panel1"
This does not seem to work.
When I update "Textbox1", "Panel1" is updated as well. I don't want that. I just want to update "Panel2"
If I remove ajax on "Button1", it works as expected.
"Panel2" is updated, and "Panel1" does not update.
Is this a bug ?
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="test2.aspx.cs" Inherits="test2" %> |
<%@ Register assembly="Telerik.Web.UI" namespace="Telerik.Web.UI" tagprefix="telerik" %> |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
<html xmlns="http://www.w3.org/1999/xhtml" > |
<head id="Head1" runat="server"> |
<title></title> |
</head> |
<body> |
<script runat="server"> |
public void Textbox1_TextChanged(object sender, EventArgs e) |
{ |
//this.label_res.Text = this.Textbox_test.Text + " " + DateTime.Now; |
//this.label1.Text = this.Textbox_test.Text + " " + DateTime.Now; |
this.LabelResult2.Text = this.Textbox1.Text + " " + DateTime.Now; |
} |
public void Button1_Click(object sender, EventArgs e) |
{ |
} |
</script> |
<form id="form1" runat="server"> |
<asp:ScriptManager ID="ScriptManager1" runat="server" EnablePartialRendering="true"> |
</asp:ScriptManager> |
<telerik:RadAjaxManager runat="server" ID="Radajaxmanager2" UpdatePanelsRenderMode="Inline" > |
<AjaxSettings> |
<telerik:AjaxSetting AjaxControlID="Textbox1" > |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="Panel2"/> |
</UpdatedControls> |
</telerik:AjaxSetting> |
<telerik:AjaxSetting AjaxControlID="Button1"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="Panel1"/> |
</UpdatedControls> |
</telerik:AjaxSetting> |
</AjaxSettings> |
</telerik:RadAjaxManager> |
Outside panel: |
<asp:Label runat="server" ID="label_clockOutsidePanel"></asp:Label><br /><br /> |
<!-- this panel should only update when BUTTON1 is clicked --> |
<asp:Panel runat="server" ID="Panel1" BorderStyle="Solid"> |
Inside panel: |
<asp:Label runat="server" ID="label_clockInsidePanel"></asp:Label><br /><br /> |
<asp:TextBox runat="server" ID="Textbox1" AutoPostBack="true" ontextchanged="Textbox1_TextChanged"> |
</asp:TextBox> |
<br /> |
<br /> |
</asp:Panel> |
<asp:Button runat="server" ID="Button1" Text="Update the panel" onclick="Button1_Click" /> |
<asp:DropDownList runat="server" id="Dropdownlist1" AutoPostBack="true"> |
<asp:ListItem Text="aaaa" Value="aaaa"></asp:ListItem> |
<asp:ListItem Text="bbbb" Value="bbbb"></asp:ListItem> |
<asp:ListItem Text="cccc" Value="cccc"></asp:ListItem> |
</asp:DropDownList> |
<br /><br /><br /> |
<br /><br /><br /> |
<!-- This panel should only update when TEXTBOX1 Changes --> |
<asp:Panel runat="server" ID="Panel2"> |
<asp:Label runat="server" ID="LabelResult2"></asp:Label> |
</asp:Panel> |
<br /><br /> |
</form> |
</body> |
</html> |