Solved

posting forms to another page?

Posted on 2002-07-22
3
230 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 50 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

Online Training Solution

Drastically shorten your training time with WalkMe's advanced online training solution that Guides your trainees to action. Forget about retraining and skyrocket knowledge retention rates.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to remove duplicate code from my project 5 66
Trigger C# code inside the SQL Server 6 57
aspx ascx, c# 7 45
async questions 5 49
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
Suggested Courses

752 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