asp.net参数传递

来源:互联网 发布:淘宝网店页头图片 编辑:程序博客网 时间:2024/05/18 02:32

1、context.Request.QueryString 传递

GET提交


请求报文中的显示:显示在报文头



2、Post提交的一种情况

使用表单,并设置表单Method=Post,必须是表单元素、带name属性、无disabled属性


接收

string strNmae=HttpContext.Current.Request.Form["txtName"];


请求报文中的显示:显示在报文体



2、响应报文

 context.Response.Write("Hello World");

使用Response.Write返回响应报文


0 0