方法一:
string username=Request["txtUserName"].ToString();
string password=Request["txtPassword"].ToString();
Response.Write("登陆的用户名为:"+username +" " +"用户的密码为:"+password);
方法二:
string username=Request.Form.Get("txtUserName").ToString();
string password=Request.Form.Get("txtPassword").ToString();
string username=Request["txtUserName"].ToString();
string password=Request["txtPassword"].ToString();
Response.Write("登陆的用户名为:"+username +" " +"用户的密码为:"+password);
方法二:
string username=Request.Form.Get("txtUserName").ToString();
string password=Request.Form.Get("txtPassword").ToString();