感谢您使用微软产品。看过代码,感觉您在使用原来ASP中的方法来传递参数给其他页面。在asp.net中编程逻辑跟asp已经有了很大不同。当您使用Server Control <asp:listbox>的时候,服务器端会有一个对应的Listbox 对象存在于对应的Page对象中。我们从服务器端考虑,我们可以在服务器端来响应这些Server Control的一些事件,比如说Button的Click. 这些消息从浏览器端传递到服务器端,需要使用post来使前端的纯HTML/DHTML页面和服务器端的对象结合起来。只要您使用了Server Control, 这些control中必须被包含在System.Web.UI.HtmlControls.HtmlForm中。(对应于<form runat=server></form>)在asp.net中把值传到其他页面,请您参阅下面的一个示例:http://www.csdn.net/expert/topic/951/951696.xml?temp=.7060511在asp.net编程中,我们需要把每一个aspx页面当作一个对象,多从服务器端进行逆向思考。原来的asp编程可能比较集中在浏览器端。希望对您有所帮助。-微软全球技术中心 本贴子以“现状”提供且没有任何担保,同时也没有授予任何权利。具体事项可参见使用条款(http://support.microsoft.com/directory/worldwide/zh-cn/community/terms_chs.asp)。
为了为您创建更好的讨论环境,请参加我们的用户满意度调查(http://support.microsoft.com/directory/worldwide/zh-cn/community/survey.asp?key=(S,49854782))。

解决方案 »

  1.   

    <form Name=Form1 runat="server">
         <h1>Feiertag Holidays</h1>
    <form action="holidayresponse.aspx" method="post">
         Please enter yhour 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>
    <input type="submit"> <input type="reset">
    </form>
    其他内容,如果有的话。
    </form>
      

  2.   

    如使用server Control的话,应该将server control 放到server端的form当中。就是<form runat=server></form>
        其中的html control仍然可以如asp当中一样获取。
      

  3.   

    用html组件框中的Text Field控件代替textbox吧,效果一样,而且作为服务器控件运行后,这个控件的value值在服务器端vb代码中和在客户端html代码中都可以获取和更改。客户端可用javascript
    获取和更改:document.form1.text1.value