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 October 15th, 2004, 08:49 AM
Authorized User
 
Join Date: Oct 2004
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem passing variables between 2 pages

I have a aspx called page1 contains many textfields such as lastName, FirstName etc... and 2 button2. and all of them are runat server.The first button submits page1.aspx to itself and do some processing and set
lastName.text ="Something" and
firstName.text = "Something".

After processing, I click second button to post to page2.aspx by javascript ( I dont want to use querystring, Server.Transfer() will be last last option)

In the page2.aspx, I could not see any values of textboxes in the first page although the method is post. Any help would appriciated

John

 
Old October 15th, 2004, 11:30 PM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 449
Thanks: 0
Thanked 1 Time in 1 Post
Send a message via MSN to r_ganesh76
Default

In my first page, I am calling a Server.Transfer from the second button click

        Server.Transfer("popupwindow.aspx", true);

You should pass the second parameter (viz. preserveForm) to true.

in the second page you can access the value of the textbox as
        Object ob = Request.Form["TextBox1"];
    Response.Write (ob.ToString());


Hope this helps you

Regards
Ganesh
 
Old October 18th, 2004, 07:27 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

http://www.dotnetjohn.com/articles.aspx?articleid=142
 
Old October 18th, 2004, 09:15 AM
Authorized User
 
Join Date: Oct 2004
Posts: 55
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for you help. However, When I use server.tranfer the target page does not link to stylesheet( because the url remain the same). How can to fix this problem?






Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem passing variables between Subs dgr7 Beginning VB 6 2 February 16th, 2007 06:40 PM
Inserting variables into aspx pages dynamically. Grumpy ASP.NET 1.0 and 1.1 Basics 3 December 20th, 2005 08:32 AM
passing data between pages johnhardy BOOK: Beginning ASP 3.0 1 October 18th, 2003 04:29 AM
Passing parameters between pages burdickdave ASP.NET 1.x and 2.0 Application Design 3 July 7th, 2003 02:11 PM





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