Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Problem retaining form data

3 views
Skip to first unread message

antony...@yahoo.com

unread,
Sep 22, 2005, 9:09:46 PM9/22/05
to
This was originally posted as a reply to a thread, but it soon sunk to
the bottom, and nobody was paying attention to this.

My problem is how to effectively retain user-supplied form data.

Say, on form1.aspx I have:

*************************
Form1 | Link_to_Form2 |
------------------------

First name: ___________
*************************

On form2.aspx I have:

*************************
Link_to_Form1 | Form2 |
------------------------

Last name: ___________
*************************

Where Link_to_Form1 and Link_to_Form2 are LinkButton objects that link
to their respective aspx pages.

Sure, nobody will develop a site that looks like this, but just so that
I can make the problem clear.

Now, if the user has filled up his first name on form1.aspx, he then
clicks on Link_to_Form2 and continues to supply his last name on
form2.aspx.

I want these two pages to be able to retain the user-supplied data, so
that once the forms have been filled, the information will always be
there no matter how many times the user clicks Link_to_Form1 or
Link_to_Form2.

I know that this will work if the user just clicks the "back" or
"forward" buttons on most browsers (mostly graphically represented by
<- or -> ).

Right now, my application does not work as I want. If the user goes to
either of the two pages by clicking on the LinkButtons I supplied, the
information they gave is gone.

I understand that I can likely achieve my goal by storing the
information in a session variable and then retrieve it from the session
variable. But is there an easier way to handle this?

Adam Knight

unread,
Sep 22, 2005, 9:19:58 PM9/22/05
to
mmm..sounds strange..

Anyway..

1) Use hidden form fields (html hidden input fields)
2) If possible use a hyperlink instead of link buttons and append the
required data to your urls.

Can't say any of these approaches are easier than using a session to store
the information though.

Cheers,
Adam


1) Append
<antony...@yahoo.com> wrote in message
news:1127437786.8...@f14g2000cwb.googlegroups.com...

0 new messages