asp.net如何判断提交方式
2015-09-25 10:14
633 查看
if (!IsPostBack)
{
if (Request.ServerVariables["REQUEST_METHOD"] == "POST")
{
string sda = Request.QueryString["userid"];
Session["user"] = sda.ToString();
Response.Write(Session["user"].ToString());
}
}
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" method="post">
<div>
<input type=submit value="提交">
</div>
</form>
</body>
</html>
{
if (Request.ServerVariables["REQUEST_METHOD"] == "POST")
{
string sda = Request.QueryString["userid"];
Session["user"] = sda.ToString();
Response.Write(Session["user"].ToString());
}
}
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" method="post">
<div>
<input type=submit value="提交">
</div>
</form>
</body>
</html>
相关文章推荐
- Aspx网页画图
- Asp.Net Mvc + ComBoost.Mvc快速开发
- ASP.NETWeb服务器验证控件如何使用
- ASP.NET预备知识学习笔记
- asp.net 事件加载顺序
- asp.net中SQL语句太长,怎么换行写?
- ASPx label显示更多文字的滚动条
- 第三章 AOP 基于@AspectJ的AOP
- AspNet MVC过滤器+实例
- 实战:把ASP.NET MVC中的Views下面的视图放到Views文件夹外
- WCF The service cannot be activated because it does not support ASP.NET compatibility
- WCF The service cannot be activated because it does not support ASP.NET compatibility
- Installing Metasploit Framework on Ubuntu 14.04 LTS and Debian 7
- RaspberryPi 更新国内源
- Web.config配置文件
- ASP.NET中事件如何依次发生?
- vs2010制作简单的asp.net网站
- ASP实现文件上传的方法
- asp循环语句总结
- ASP 数字分页效果代码分享