[英]ASP.NET Webform: Getting values of selected checkbox on codebehind
I have added a check box
to the Jquery Datatable, can you please advise how can i get value of the selected checkbox
on button click
code behind.I am using Asp.Net
Webforms
.我在 Jquery 数据表check box
添加了一个check box
,您能否告知我如何在button click
代码后面获取所选checkbox
值。我正在使用Asp.Net
Webforms
。 Thanks.谢谢。
<input type='checkbox' value="xxx">
I expect to access the value of selected checkbox
on codebehind
我希望访问代码codebehind
上选定checkbox
的值
By using runat server you can easily get value of input tag.通过使用 runat 服务器,您可以轻松获取输入标签的值。
<input type='checkbox' id="testID" value="xxx" runat="server">
Code Behind背后的代码
string inputvalue = testID.Value;
Or you can use或者你可以使用
<input type='checkbox' id="testID" value="xxx">
Code Behind背后的代码
string inputvalue = Request.Form["testID"]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.