您的位置:首页 > 编程语言 > ASP

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>
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: