更新时间:2022-12-26 13:49:26
嘿,
将ur RBLstSeries的AutoPostback属性设置为true
或按照以下内容替换您的代码
Hey,
set AutoPostback property true of ur RBLstSeries
or replace ur code by following
<asp:UpdatePanel runat="server" ID="HoodUpdatePane" UpdateMode="Conditional">
<ContentTemplate>
<asp:RadioButtonList ID="RBLstSeries" runat="server" AutoPostBack="True"
onselectedindexchanged="RBLstSeries_SelectedIndexChanged" >
<asp:ListItem Text="ELXC" Value="ELXC" Enabled="false"></asp:ListItem>
<asp:ListItem Text="ELXC-UVi" Value="ELXC-UVi" Enabled="false"></asp:ListItem>
<asp:ListItem Text="ELX" Value="ELX" Enabled="true" Selected="True"></asp:ListItem>
<asp:ListItem Text="ELX-UVi" Value="ELX-UVi" Enabled="false"></asp:ListItem>
<asp:ListItem Text="PG" Value="PG" Enabled="false"></asp:ListItem>
<asp:ListItem Text="VH2" Value="VH2"></asp:ListItem>
</asp:RadioButtonList>
<br />
<asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
</ContentTemplate>
</asp:UpdatePanel>
并在aspx.cs页面中添加以下事件
and in aspx.cs page add following event
protected void RBLstSeries_SelectedIndexChanged(object sender, EventArgs e)
{
Label1.Text = "Post back Done";
}
希望您的问题得到解决
祝你好运
快乐的编码
hope ur problem is solved
best Luck
happy coding
RBLstSeries是UpdatePanel的子级,您不需要为其添加AsyncPostBackTrigger.在UpdatePanel上设置ChildrenAsTriggers = true.
RBLstSeries is a child of the UpdatePanel, you don''t need to add AsyncPostBackTrigger for it. Set ChildrenAsTriggers=true on the UpdatePanel.
请检查正在执行页面的浏览器.Googlechrome将不支持Ajax.
谢谢,
灰烬
Please check the browser in which you are executing your page.Google chrome wont support Ajax.
Thanks,
Ashish