ITPub博客

首页 > Linux操作系统 > Linux操作系统 > 在cs页面获取input的值方法

在cs页面获取input的值方法

原创 Linux操作系统 作者:iDotNetSpace 时间:2008-09-05 09:52:22 0 删除 编辑

概述:

      想在后台cs页面得到前台页面aspx中html控件input输入的值.

解决方法如下:

   1.用Request["name"].toString();.

前台代码如下:


<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->用户名:<input name="username" type="text">

后台获取代码如下:

 


<!--

Code highlighting produced by Actipro CodeHighlighter (freeware)
http://www.CodeHighlighter.com/

-->string username = Request["username"].ToString();

  2.用Request.Form.Get("name").ToString();

前台代码如上一样.

后台获取代码如下:

 


<!--

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/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2008-01-04

  • 博文量
    2376
  • 访问量
    5766245