public void ProcessRequest(HttpContext context)
context.Response.ContentType=”text/html”;
System.Text.StringBuilder sbHTML=new System.Text.StringBuilder();
SbHTML.Append(“<html><head><title>登陆页面</title></head><body><form action=’01.ashx’ method=’get’>”);
sbHTML.Append(“用户名:<input type=’text’ name=’txtName’ /><br/>密码:<input type=’password’ name=’txtpwd’/><br/>”);
sbHTML.Append(“<input type=’submit’ value=’登陆’/>”);
sbHTML.Append(“</form></body><html>”);
Context.Response.Write(sbHTML.ToString());
string strUserName=context.Request.Form[“txtName”];
if(!string.IsNullOrEmpty(strUserName)){
context.Reponse.Write(“Form表单中的值:”+strUserName);
}
String strUserName2=context.Repuest.QueryString[“txtNama”];
If(!string.IsNullOrEmpty(strUserName2)){
Context.Repuest.Write(“URL中的值”+strUserName);
}
问题:为什么运行结果只有url中的值+‘’ |