概述:
想在后台cs页面得到前台页面aspx中html控件input输入的值.
解决方法如下:
1.用Request["name"].toString();.
前台代码如下:

Code
<!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
-->用户名:<input name="username" type="text">
后台获取代码如下:

Code
<!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
-->string username = Request["username"].ToString();
2.用Request.Form.Get("name").ToString();
前台代码如上一样.
后台获取代码如下:

Code
<!--
Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/
-->string username = Request.Form.Get("username").ToString();
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/12639172/viewspace-441967/
,如需转载,请注明出处,否则将追究法律责任。