代码如下:
<html>
<head>
  <title>Holiday page</title>
</head>
<body>
  <form action="holidayresponse.aspx" method="post">
    <h1>Feiertag Holidays</h1>
    Please enter your details here.
    <br /><br />
    Name:<asp:textbox id="FullName" runat="server" />
    <br /><br />
    Address:<asp:textbox id="Address" rows="5" textmode="multiline" 
                         runat="server" />
    <br /><br />
    Sex - 
    <asp:radiobuttonlist id="sex" runat="server">
      <asp:listitem value="Male" />
      <asp:listitem value="Female" />
    </asp:radiobuttonlist>
    Please select the destination you would like details on:
    <asp:dropdownlist id="Destination" runat="server">
      <asp:listitem value="Madrid" />
      <asp:listitem value="Barcelona"/>
      <asp:listitem value="Lisbon"/>
      <asp:listitem value="Oslo"/>
      <asp:listitem value="Prague"/>
    </asp:dropdownlist>
    <br /><br />
      <input type="Submit">
    <input type="Reset">
  </form>  
</body>
</html>
浏览器出错提示:
类型“TextBox”的控件“FullName”必须放在具有 runat=server 的窗体标记内
 说明: 执行当前 Web 请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。 异常详细信息: System.Web.HttpException: 类型“TextBox”的控件“FullName”必须放在具有 runat=server 的窗体标记内。源错误: 执行当前 Web 请求期间生成了未处理的异常。可以使用下面的异常堆栈跟踪信息确定有关异常原因和发生位置的信息 
响应页代码:<script runat="server" language="c#">
  void Page_Load()
  {
   Response.Write("<b>Name:<b>"+Request.Form["FullName"]+"<br/>");
   Response.Write("<b>Address:<b>"+Request.Form["Address"]+"<br/>");
   Response.Write("<b>Sex:<b>"+Request.Form["Sex"]+"<br/>");
   Response.Write("<b>Destination<b>"+Request.Form["Destination"]+"<br/>");
  }
</script>
<html>
<head>
  <title>Holiday page</title>
</head>
<body>
  <br/><br/>
  These details have been entered into our database,you should receive a confirmation email from us shortly.
  <br/><br/>
</body>
</html> 
刚才也提过关于这段代码出的问题~~可能于这里又关~~
大侠帮忙啊~~~

解决方案 »

  1.   

    <form action="holidayresponse.aspx" method="post">==><form method="post" runat="server">if you want to post it to another pagex, you either need to save data and call Response.Redirect or call Server.Transfer or use javascript to change the action property of the form
      

  2.   

    <form>里面加上runat="server"
      

  3.   

    在<form action="holidayresponse.aspx" method="post"> 中加入 runat="server"将会出现新问题
    这个问题我在我的另一个帖子(高手帮忙~~ 一个相应页的问题??? )已问到~~
     我要用响应页处理用我的方法是不是不行~~~????
      

  4.   

    不要加上这个:action="holidayresponse.aspx"
    仅保留<form id="xx" runat="server" method="post">