qq_35905323 2016-09-28 08:39 采纳率: 14.8%
浏览 768

前面代码怎么获取后面内容

 <%@ 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条回答

  • qq_35905323 2016-09-28 09:16
    关注

    post

    改成
    评论

报告相同问题?

悬赏问题

  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
  • ¥30 python代码,帮调试
  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?