Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Basics
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 6th, 2003, 02:08 AM
Registered User
Join Date: Dec 2003
Location: , , China.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default a problem in book<<beginning asp.net using vb>>

  Two days ago I begined to study this book and then meeted a problem .
  After I executed the holidaypage.aspx with webbrower ,it said that:"Control 'address' of type 'TextBox' must be placed inside a form tag with runat=server ".
  But if place "runat=server" into the form tag of "hoidaypage.aspx",my brower will not auto go to the "holidayresponse.aspx" after click submit button.It also display "hoidaypage.aspx". The point is that I want it to auto display "holidayresponse.aspx" after click submit button!

Below is the origin code:
    <title>Holiday page</title>
   <form action="holidayresponse.aspx" method="post">
      Please enter your name:
      <asp:textbox id="fullname" />
      <br /><br />
      Please enter your address:
      <asp:textbox runat="server" id="address" rows=5 textmode="multiline" />
      <br /><br />
      please choose ************:
      <asp:radiobuttonlist id="************" runat="server">
        <asp:listitem id="option1" value="Male" />
        <asp:listitem id="option2" value="Female" />
      <br /><br />
      Please select the destination you would like details on:
      <asp:dropdownlist id="destination" runat="server">
         <asp:listitem value="madrid"/>
         <asp:listitem value="oslo"/>
         <asp:listitem value="prague"/>
         <asp:listitem value="lisbon"/>
      <input type="Submit">
        <input type="reset">

 <script runat="server" language="vb">
  Sub Page_Load()
   End Sub
    <title>Holiday page</title>
     These details have been entered into our database.
     You will receive a confirmation email from us shortly.

  #2 (permalink)  
Old December 7th, 2003, 03:10 AM
Friend of Wrox
Join Date: Jun 2003
Location: , , .
Posts: 540
Thanks: 0
Thanked 4 Times in 4 Posts

Asp.net pages don't work the same way classic ASP pages did. The form will always be posted back to the original page. It was created that way to act more like Windows forms.

If you want move to a different page, you will have to pass those values a different way like in a querystring. However, in my opinion, this kind of defeats the purpose of using .net.

  #3 (permalink)  
Old December 8th, 2003, 04:16 PM
Friend of Wrox
Join Date: Jun 2003
Location: , , USA.
Posts: 1,111
Thanks: 0
Thanked 3 Times in 3 Posts

if you are passing values to a different page you can't retrieve that information by using asp.net controls. instead, you need to use the Params collection from the HTTPRequest class.

ex. Request.Params("fullname")

  #4 (permalink)  
Old December 8th, 2003, 09:32 PM
Authorized User
Join Date: Jun 2003
Location: Melbourne, Victoria, Australia.
Posts: 90
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to tdaustin Send a message via Yahoo to tdaustin

Alternatively the old ASP collections are still supported.
eg. Request.QueryString("fullname")



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Ch 8: <asp:image> inside <a> & ext.CSS (pg. 274) epc BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 1 July 12th, 2008 04:37 AM
<style> tags in a <body> vs. <div> bcat BOOK: Beginning CSS: Cascading Style Sheets for Web Design ISBN: 978-0-7645-7642-3 1 March 27th, 2005 08:50 AM
<marquee><b>About CHAT App. in PHP4</b></marquee> Ramkrishna PHP How-To 1 September 11th, 2004 07:01 AM
the book <<Data-Centric.net programing with c#>> jamxx All Other Wrox Books 0 November 18th, 2003 10:56 PM
<<ASP.NET Security>>,download files in chapter 8 alaix All Other Wrox Books 1 July 24th, 2003 10:29 AM

All times are GMT -4. The time now is 04:43 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.