开发者

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

开发者_如何学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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜