<%@ Page Language="C#" %><html>
<head>
<link rel="stylesheet"href="intro.css">
</head> <body><!-- #include File="C:\Inetpub\wwwroot\DotNetJunkies\DotNetJunkiesWeb\_js\omni.inc" --> <center> <form action="intro3.aspx"> <h3> Name: <input name="Name" type=text value="<%=HttpUtility.HtmlEncode(Request.QueryString["Name"])%>"> Category: <select name="Category" size=1> <%
String [] values = { "psychology", "business", "popular_comp" }; for (int i=0; i<values.Length; i++) {
%> <option <% if (Request.QueryString["Category"] == values[i]) { Response.Write("selected"); } %>>
<%=values[i]%>
</option> <% } %> </select> </h3> <input type=submit name="Lookup" value="Lookup"> <p> <% if (Request.QueryString["Lookup"] != null) { %> Hi <%=HttpUtility.HtmlEncode(Request.QueryString["Name"]) %>, you selected: <%=HttpUtility.HtmlEncode(Request.QueryString["Category"]) %> <% } %> </form> </center> </body>
</html>
点了提交以后,在地址栏就会有下面的地址http://localhost/test.aspx?Name=ppp&Category=psychology&Lookup=Lookup什么情况下,表单的提交会放到地址栏里面啊,并且不理解,为什么提交按钮也会在地址栏里面呢??
<head>
<link rel="stylesheet"href="intro.css">
</head> <body><!-- #include File="C:\Inetpub\wwwroot\DotNetJunkies\DotNetJunkiesWeb\_js\omni.inc" --> <center> <form action="intro3.aspx"> <h3> Name: <input name="Name" type=text value="<%=HttpUtility.HtmlEncode(Request.QueryString["Name"])%>"> Category: <select name="Category" size=1> <%
String [] values = { "psychology", "business", "popular_comp" }; for (int i=0; i<values.Length; i++) {
%> <option <% if (Request.QueryString["Category"] == values[i]) { Response.Write("selected"); } %>>
<%=values[i]%>
</option> <% } %> </select> </h3> <input type=submit name="Lookup" value="Lookup"> <p> <% if (Request.QueryString["Lookup"] != null) { %> Hi <%=HttpUtility.HtmlEncode(Request.QueryString["Name"]) %>, you selected: <%=HttpUtility.HtmlEncode(Request.QueryString["Category"]) %> <% } %> </form> </center> </body>
</html>
点了提交以后,在地址栏就会有下面的地址http://localhost/test.aspx?Name=ppp&Category=psychology&Lookup=Lookup什么情况下,表单的提交会放到地址栏里面啊,并且不理解,为什么提交按钮也会在地址栏里面呢??
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货