Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

posting forms to another page?

Posted on 2002-07-22
3
Medium Priority
?
232 Views
Last Modified: 2010-04-15
is there a quick method of being able to retrieve form values if i post it to another page?

if I use on my submit button of Page1.aspx:
Server.Transfer("Page2.aspx", true);

I get a ViewState not found error on Page2.aspx.  

I understand this error, but cannot figure out a workaround,

I've tried making  all of the controls on Page1 public, then on Page2 doing this:

Page1 Pg1 = new Page1();
Response.Write(Pg1.Text1.Text.ToString());

Intellisense finds the controls, however, when I run this code, it tells me object reference not set to an instance of an object?

any help?

Thanks,

Sean
0
Comment
Question by:SeanGraflund
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 9

Expert Comment

by:ShaunWilde
ID: 7170375
don't try to treat the webforms as you would a winform - Any informtaion that you wish to pass between forms could be passed via the Session object - not very OO I'll admit
0
 

Accepted Solution

by:
chrisdedels earned 200 total points
ID: 7172934
Sean,

Try this link:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vbcon/html/vbtskPassingValuesBetweenWebFormsPages.asp

It should be of some help.  In addition, you will also need the following reference in the HTML of your destination page:

<%@ Reference Page="originatingpage.aspx" %>

Chris
0
 
LVL 20

Expert Comment

by:TheAvenger
ID: 9505100
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
Accept a comment by chrisdedels
Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

TheAvenger
EE Cleanup Volunteer
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
Have you created a query with information for a calendar? ... and then, abra-cadabra, the calendar is done?! I am going to show you how to make that happen. Visualize your data!  ... really see it To use the code to create a calendar from a q…
Suggested Courses

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question