Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 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 27th, 2005, 07:16 PM
Registered User
 
Join Date: Jul 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to dyingtree
Default how to send info during two pages in ASP.NET v1.1

I want to send the information in page1 to display in page2

code in page1 is:__________________________
<html>
<head>
<title>Holiday page</title>
</head>
<body>
     <form action="holidayresponse.aspx" method="post" runat="server">
          <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>
          ************-
          <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="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>

and code in page2 to receive the data is:______________________
<script runat="server" language="vb">
sub page_load()
      response.write("<b>Name:</b>"+Request.Form("FullName")+"<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,you should receive a confirmation email from us shortly.
<br><br>
</body>
</html>


why doesn't it work? i followed the exmaple exactly in the book "Beginning ASP.NET using VB.NET"





 
Old July 27th, 2005, 08:26 PM
Registered User
 
Join Date: Jul 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to dyingtree
Default

BTW:if removed runat="server",the controls can't be seen.
but the page transfers right.

 
Old July 27th, 2005, 10:48 PM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 1,348
Thanks: 0
Thanked 5 Times in 5 Posts
Default

I am not sure why you are using <script> tags in you code behind. Simply place your response.write statements in the Page_Load event of Page2.

 
Old July 28th, 2005, 02:14 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 beta's of the .NET framework supported cross-page posting, and that's what the book was written against. With the RTM release this is no longer possible. So, even if you set the form's action to holidayresponse.aspx, it will change to the current document's name automatically. To see what I mean, look in the resulting HTML for the page in the browser. Instead of "holidayresponse.aspx", you'll see something like "Page1.aspx".

Search this forum for holidayresponse.aspx to see a couple of related posts.

Cross-page posting will be back in ASP.NET 2....

Cheers,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old July 28th, 2005, 02:27 AM
Registered User
 
Join Date: Jul 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to dyingtree
Default

To jbenson001: just seperate data from html
To Imar:so many thanks from China







Similar Threads
Thread Thread Starter Forum Replies Last Post
INFO: Adding Google Maps (New ASP.Net Control) jimibt BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 4 September 12th, 2007 03:18 AM
send MASS Emails in ASP.NET 2 with VB.NET 2005 alexdcosta ASP.NET 2.0 Basics 1 July 17th, 2006 12:31 AM
not able to uninstall .net 2003 v1.1 maniaug81 .NET Web Services 0 February 17th, 2005 04:36 AM
COM+ component - unauthorized access on V1.1 .NET jdmc C# 1 September 29th, 2003 09:51 AM
.NET Framework v1.1 NemeSYS VS.NET 2002/2003 3 September 17th, 2003 10:18 PM





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