开发者

facebook iframe application ,with master page, doesn't firing OnSelectedIndexChanged event

开发者 https://www.devze.com 2023-01-05 01:57 出处:网络
开发者_如何学Gothis is my radio button list: <asp:RadioButtonList runat=\"server\" ID=\"rdlTest\" OnSelectedIndexChanged=\"rdlTst_selectedChange\">

开发者_如何学Gothis is my radio button list:

   <asp:RadioButtonList runat="server" ID="rdlTest" OnSelectedIndexChanged="rdlTst_selectedChange">
            <asp:ListItem>1</asp:ListItem>
            <asp:ListItem>2</asp:ListItem>
        </asp:RadioButtonList

this is the code behind:

protected void rdlTst_selectedChange(object sender, EventArgs e)
    {
        Response.Write("hello");
    }

it's not firing the event for some reason


You need to add AutoPostBack = "true" onto the definition of the RadioButtonList.

  <asp:RadioButtonList runat="server" ID="rdlTest" AutoPostBack="true" OnSelectedIndexChanged="rdlTst_selectedChange">
            <asp:ListItem>1</asp:ListItem>
            <asp:ListItem>2</asp:ListItem>
   </asp:RadioButtonList>
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号