我在用户控件中有2个单选按钮,并且控件已注册到该页面。当我单击单选按钮时,事件(CheckChanged)不会触发。单选按钮检查更改甚至没有触发
<asp:View ID="viewfirst" runat="server">
<asp:UpdatePanel ID="updatepanel1" runat="server" UpdateMode="Always">
<ContentTemplate>
<asp:RadioButton ID="radio1" Text="Yes" Enabled="true" runat="server" />
<asp:RadioButton ID="radio2" Text="No" Enabled="true" runat="server" />
</ContentTemplate>
</asp:UpdatePanel>
</asp:View>
Below is code in behind file of the control.
Protected Sub radio1_CheckedChanged(sender As Object, e As EventArgs) Handles radio1.CheckedChanged
//
//
End Sub
看起来一切看起来不错,但有些事情是错误的。你可以让我知道。
在这件事情中没有什么,你会怎么知道它是否会燃烧? – OneFineDay
将'autopostback = true'添加到单选按钮 – Sandeep