前面代码怎么获取后面内容
 <%@ Page Language="C#" Debug="true"%>
<%
    int loop1;
    //Load NameValueCollection object.
    NameValueCollection coll = Request.Form;
    //Get name of all keys into a string array.
    String[] arr1 = coll.AllKeys;
   %>
<html>
    <p ALIGN="CENTER"><font SIZE="+2" COLOR="#000080"><b>你提交的调查表内容如下:</b></font></p>
    <head><title>用户信息</title></head>
    <body bgcolor="#6699dd"
        <%
        String[] arr2 = coll.GetValues(arr1[0]);
        Response.Write("用户名为:" + arr2[0] + "<br>");
        arr2 = coll.GetValues(arr1[1]);
        Response.Write("第一次输入的密码为:" + arr2[0] + "<br>");
        arr2 = coll.GetValues(arr1[2]);
        Response.Write("第二次输入的密码为:" + arr2[0] + "<br>");
        arr2 = coll.GetValues(arr1[3]);
        Response.Write("你的真实姓名为:" + arr2[0] + "<br>");
        arr2 = coll.GetValues(arr1[4]);
        Response.Write("你的住址为:" + arr2[0] + "<br>");
        arr2 = coll.GetValues(arr1[5]);
        Response.Write("你的院系为:" + arr2[0] + "<br>");
        arr2 = coll.GetValues(arr1[6]);
        Response.Write("你的留言为:" + arr2[0] + "<br>");
        arr2 = coll.GetValues(arr1[7]);
        Response.Write("你所在的城市为:" + arr2[0] + "<br>");
        arr2 = coll.GetValues(arr1[8]);
        Response.Write("你的爱好为:" + arr2[0] + "<br>");
        arr2 = coll.GetValues(arr1[9]);
        Response.Write("你的性别为:" + arr2[0] + "<br>");
        arr2 = coll.GetValues(arr1[10]);
        Response.Write("你的血型为:" + arr2[0] + "<br>");

         %>
</body>
</html>



<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body bgcolor="#6699dd">
    <h2 align="center">调查表单</h2>
    <hr />
    <form id="form1" runat="server">
    <div>
        <p>用户名:<input type="text" size="20" name="UserName" /></p>
        <p>输入密码:<input type="password" size="20" name="password1" /></p>
        <p>密码校对:<input type="password" size="20" name="password2" /></p>
        <p>真实姓名:<input type="text" size="20" name="truename" /></p>
        <p>电子邮箱:<input type="text" size="20" name="email" /></p>
        <p>住址:<input type="text" size="40" name="address" /></p>
        <p>院系:<input type="text" size="20" name="yuanxi" /></p>
        <p>留言:</p>
        <p><textarea name="Memo" rows="4" cols="60"></textarea></p>
        <p>所在城市:<select name="City" size="1">
            <option>北京市</option>
            <option>上海市</option>
            <option>天津市</option>
            <option>重庆市</option>
                </select></p>
        <ul>
            个人爱好:<li><input type="checkbox" name="love" value="跳舞" />跳舞<br />
                <input type="checkbox" name="love" value="唱歌" />唱歌<br />
                 <input type="checkbox" name="love" value="ON" />喝酒<br />
                 <input type="checkbox" name="love" value="打牌" />打牌<br />
                 <input type="checkbox" name="love" value="看书" />看书<br />
                 </li>
        </ul>
        <p>性别:<input Type="Radio" Name="sex" Value="男" Checked />男<input Type="Radio" Name="sex" Value="女">女</p>
        <p>血型:<input Type="Radio" Name="blood" Value="A" Checked />A<input Type="Radio" Name="blood" Value="B" />B<input Type="Radio" Name="blood" Value="AB" />AB<input Type="Radio" Name="blood" Value="O" />O</p>
        <p><input type="submit" value="提交" /></p>  
    </div>
    </form>
</body>
</html>


2个回答

post

改成
  <form id="form1" action="你的第二个页面">

 Response.Write("第一次输入的密码为:" + Request.Form[arr2[0]] + "<br>");

 别的类似
Csdn user default icon
上传中...
上传图片
插入图片
抄袭、复制答案,以达到刷声望分或其他目的的行为,在CSDN问答是严格禁止的,一经发现立刻封号。是时候展现真正的技术了!
立即提问
相关内容推荐