如何获得嵌套在DataList中RadioButtonList控件的SelectedIndexChanged事件? 如何获得嵌套在DataList中RadioButtonList控件的SelectedIndexChanged事件? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 请参考以下代码1.在ASPX页面添加如下代码:<FooterTemplate> <asp:TextBox id="TextBox1" runat="server" AutoPostBack="True"></asp:TextBox></FooterTemplate>2.在PAGE_LOAD里面添加如下语句TextBox mytxt = (TextBox)this.myGrid.Controls[0].Controls[this.myGrid.Controls[0].Controls.Count-1].FindControl("TextBox1");mytxt.TextChanged += new System.EventHandler(this.mytxt_TextChanged);3.在后台添加如下事件代码private void mytxt_TextChanged(object sender, System.EventArgs e){ this.Response.Write("<script>alert('响应了');</script>"); this.Response.End();}同时,你必须保证你页面中有一个按钮,否则它不会提交.如此,当在输入框里面回车时,则自动响应上述事件代码. 没看明白。RadioButtonList控件有SelectedIndexChanged事件,可是该控件嵌套到DataList中就找不到这个事件了,这可该怎么办? 试着把SelectedIndexChanged()中的内容写到DataList的ItemCommand()事件里面! SQL语句 and ([Attribute] & {0})={0} 这个上什么意思呢 ASp.net禁止代理Ip访问 怎么用ASP。NET制作留言板 GridView+TreeView+Javascript的小问题 请问哪里没有实例化呢?在线等 让gridview绑定后无刷新,当然不是UpdatePanel这么简单的(这个问题解决了估计就很可以无敌一阵子了。。) 求一分页语句写法 请教ASP.NET1.0 ,ASP.NET2.0的问题 无法获取GridView模板列中TextBox中的值,哪位高手帮帮忙看看。 .net 网站设置编译后的dll版本号 高手,请进!!! 请教连接池问题?
<FooterTemplate>
<asp:TextBox id="TextBox1" runat="server" AutoPostBack="True"></asp:TextBox>
</FooterTemplate>
2.在PAGE_LOAD里面添加如下语句
TextBox mytxt = (TextBox)this.myGrid.Controls[0].Controls[this.myGrid.Controls[0].Controls.Count-1].FindControl("TextBox1");
mytxt.TextChanged += new System.EventHandler(this.mytxt_TextChanged);3.在后台添加如下事件代码
private void mytxt_TextChanged(object sender, System.EventArgs e)
{
this.Response.Write("<script>alert('响应了');</script>");
this.Response.End();
}同时,你必须保证你页面中有一个按钮,否则它不会提交.
如此,当在输入框里面回车时,则自动响应上述事件代码.
RadioButtonList控件有SelectedIndexChanged事件,可是该控件嵌套到DataList中就找不到这个事件了,这可该怎么办?