Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 1.0
This is the forum to discuss the Wrox book Beginning ASP.NET 1.0 with C# by Chris Goode, John Kauffman, Christopher L. Miller, Neil Raybould, S. Srinivasa Sivakumar, Dave Sussman, Ollie Cornes, Rob Birdwell, Matt Butler, Gary Johnson, Ajoy Krishnamoorthy, Juan T. Llibre, Chris Ullman; ISBN: 9780764543708
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 1.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 10th, 2004, 03:04 AM
Registered User
 
Join Date: Jul 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default a problem

in chapter3 the last example, i completely enter the code according to the book, but it seems not to function correctly.
the page shows the 'textbox'control should be put into a 'form' mark with 'runat=server'. But in the book it writes that 'runat=server' is not needed here since another page will be used to cover the former one.

 
Old July 10th, 2004, 03:52 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 331
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to qazi_nomi
Default

Can u post its code here to check it properly

Love 4 all
 
Old July 10th, 2004, 08:12 AM
Registered User
 
Join Date: Jul 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

holidaypage.aspx:

<html>
  <head>
    <title>Holiday Page</title>
  </head>
  <body>
    <form action="holidayresponse.aspx" method="post">
      <h1>Felertag Holidays</h1>
      <br/><br/>
      Please enter your details here.
      <br/><br/>
      Name:<asp:textbox id="name" runat="server"/>
      <br/><br/>
      Address:<asp:textbox id="address" textmode="multiline" rows="3" runat="server"/>
      <br/><br/>
      ************:
      <asp:radiobuttonlist id="************" runat="server">
        <asp:listitem value="Male"/>
        <asp:listitem value="Female"/>
      </asp:radiobuttonlist>
      Please select the destination you would like details on
      <asp:dropdownlist id="destinaion" runat="server">
        <asp:listitem value="Beijing"/>
        <asp:listitem value="Shanghai"/>
    <asp:listitem value="Hongkong"/>
      </asp:dropdownlist>
      <br/><br/>
      <input type="submit">
      <input type="reset">
    </form>
  </body>
</html>

holidayresponse.aspx:

<script language="vb" runat="server">
  sub Page_Load()
    response.write("<b>Name:</b>"+request.form("name")+"<br/>")
    response.write("<b>Address:</b>"+request.form("address")+"<br/>")
    response.write("<b>************:</b>"+request.form("************")+"<br/>")
    response.write("<b>Destination:</b>"+request.form("destination")+"<br/>")
  end sub
</script>

<html>
  <head>
    <title>Holiday Page</title>
  </head>
  <body>
    <br/><br/>These details have been entered into our database, and you will receive a confirmation email from us shortly.
  </body>
</html>

 
Old July 10th, 2004, 08:58 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

Yes all tags witch start with <asp: must be in a [u]Runat=Server</u> cuz they r a ASP Controls.
But about ur Form Action I should Add that it wont submit to holidayresponse.aspx, bc of being runat server!
R u sure about ur code?!
What kind of book it is?! maybe there is a Errata?!

Always:),
Hovik Melkomian.
 
Old July 10th, 2004, 11:44 PM
Registered User
 
Join Date: Jul 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

yes, it's wrox's book named 'Beginning ASP.NET using VB.NET' in chinese. In this book, it surely tells that it can submit to holidayresponse.aspx coz the 'form' tag with using 'action' attribute and without using attribute 'runat=server'. anybody can explain it? i am totally confused!

 
Old July 11th, 2004, 08:26 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Early betas of .NET supported pages submitting to another page, but that feature was dropped (but will be reintroduced in ASP.NET 2.0)

Right now, you can't mix the two. Either you have a runat="server" attribute, or you can specify a target, but you cannot mix the two.

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
While typing this post, I was listening to: Glass by Incubus (Track 5 from the album: S.C.I.E.N.C.E.) What's This?
 
Old July 11th, 2004, 09:49 PM
Registered User
 
Join Date: Jul 2004
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

3q:)










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