I have 4 forms each on a separate page respectively form1.aspx,
form2.aspx, form3.aspx, form4.aspx.
On top of each of the four pages there are 4 links which link to the
aforementioned 4 pages like this:
Form1 Form2 Form3 Form4
Important: Only form4.aspx has a submit button, none of the other 3
forms has any kind of submit or 'next step' button.
So, how can I collect the data from, say, form1, when the user clicks
the link Form2 or Form3 or Form4 to continue?
I know that I can use session for this case, but the problem is, since
there is no submit button on form1, form2 and form3, what triggers the
action of data-collection from these 3 pages when the user leaves them
by clicking the links at the top of the page?
I don't think there is an onLeave function, is there?
Any idea? Thanks a lot! 5 1484
Make your links into LinkButton objects which will post back the page. Then
do any page processing you need to and use the Response.Redirect method to
send the client to the next page.
--
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
<an***********@yahoo.com> wrote in message
news:11**********************@z14g2000cwz.googlegr oups.com... I have 4 forms each on a separate page respectively form1.aspx, form2.aspx, form3.aspx, form4.aspx.
On top of each of the four pages there are 4 links which link to the aforementioned 4 pages like this:
Form1 Form2 Form3 Form4
Important: Only form4.aspx has a submit button, none of the other 3 forms has any kind of submit or 'next step' button.
So, how can I collect the data from, say, form1, when the user clicks the link Form2 or Form3 or Form4 to continue?
I know that I can use session for this case, but the problem is, since there is no submit button on form1, form2 and form3, what triggers the action of data-collection from these 3 pages when the user leaves them by clicking the links at the top of the page?
I don't think there is an onLeave function, is there?
Any idea? Thanks a lot!
Hey, Justin,
This sounds cool! I will absolutely try it out. By trying it out, I
mean that I don't yet know how to do it, but with your hint, I think I
can probably figure it out. Thanks a lot!
S. Justin Gengo wrote: Make your links into LinkButton objects which will post back the page. Then do any page processing you need to and use the Response.Redirect method to send the client to the next page.
-- Sincerely,
S. Justin Gengo, MCP Web Developer / Programmer
www.aboutfortunate.com
"Out of chaos comes order." Nietzsche <an***********@yahoo.com> wrote in message news:11**********************@z14g2000cwz.googlegr oups.com...I have 4 forms each on a separate page respectively form1.aspx, form2.aspx, form3.aspx, form4.aspx.
On top of each of the four pages there are 4 links which link to the aforementioned 4 pages like this:
Form1 Form2 Form3 Form4
Important: Only form4.aspx has a submit button, none of the other 3 forms has any kind of submit or 'next step' button.
So, how can I collect the data from, say, form1, when the user clicks the link Form2 or Form3 or Form4 to continue?
I know that I can use session for this case, but the problem is, since there is no submit button on form1, form2 and form3, what triggers the action of data-collection from these 3 pages when the user leaves them by clicking the links at the top of the page?
I don't think there is an onLeave function, is there?
Any idea? Thanks a lot!
Another method would be to use 4 ASP:PANELs in a single page and hide
and show each of them(using javascript) upon clicking the form names.
The advantages are that
1) This method require only 1 database post
2) You dont need any special logic/temp table to display the data
already entered by user in the previous form
3) No partially saving data ,when the user never actually submitted.
(could be a disadvantage too if u plan to save partial data)
4) No page refresh required while changing between forms
only an option if you could afford to redesign the pages and if the
current forms are not too complex.
If interested try google on ASP:PANEL .. i remeber seeing a very good
article with code on how to use panels to achive this.
Yes, I've heard of this option, too. But I think it is kind of
difficult to implement, especially when you want it to be compatible
with most major browsers.
I have implemented the LinkButton approach Justin offered. It works
great! Thx.
That said, I have one more little problem.
Say, on form1.aspx I have:
*************************
Form1 | Link_to_Form2 |
------------------------
First name: ___________
*************************
On form2.aspx I have:
*************************
Link_to_Form1 | Form2 |
------------------------
Last name: ___________
*************************
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 also know that I can 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?
sreejith....@gmail.com wrote: Another method would be to use 4 ASP:PANELs in a single page and hide and show each of them(using javascript) upon clicking the form names.
The advantages are that 1) This method require only 1 database post 2) You dont need any special logic/temp table to display the data already entered by user in the previous form 3) No partially saving data ,when the user never actually submitted. (could be a disadvantage too if u plan to save partial data) 4) No page refresh required while changing between forms
only an option if you could afford to redesign the pages and if the current forms are not too complex.
If interested try google on ASP:PANEL .. i remeber seeing a very good article with code on how to use panels to achive this.
An easier way than storing the information in the session variable? No, I
think that's the easiest way.
But there are other ways to do this. One way would be to store the
information in the Page.Context object and use Server.Transfer to move from
one page to the other.
That would look something like this:
Page 1:
Context.Items.Add("FirstName", FirstNameTextBox.Text)
Server.Transfer("page2.aspx")
Page 2:
'---On page load store the FirstName in viewstate.
Dim FirstName As String = Context.Items.Item("FirstName").ToString
ViewState.Add("FirstName", FirstName)
'---LinkButton Postback on page two returns to page 1
Context.Items.Add("FirstName", ViewState.Item("FirstName").ToString
Server.Transer("page1.aspx")
'---Back on page 1 check if first name already exists in context
If Not Context.Items.Item("FirstName") Is Nothing Then
FirstNameTextBox.Text = Context.Items.Item("FirstName").ToString
End If
As you can see this is a little more complex than using session variables.
But if you don't want to be reliant on the session this would be a good way
to go.
--
Sincerely,
S. Justin Gengo, MCP
Web Developer / Programmer www.aboutfortunate.com
"Out of chaos comes order."
Nietzsche
<an***********@yahoo.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com... Yes, I've heard of this option, too. But I think it is kind of difficult to implement, especially when you want it to be compatible with most major browsers.
I have implemented the LinkButton approach Justin offered. It works great! Thx.
That said, I have one more little problem.
Say, on form1.aspx I have:
************************* Form1 | Link_to_Form2 | ------------------------
First name: ___________ *************************
On form2.aspx I have:
************************* Link_to_Form1 | Form2 | ------------------------
Last name: ___________ *************************
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 also know that I can 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?
sreejith....@gmail.com wrote: Another method would be to use 4 ASP:PANELs in a single page and hide and show each of them(using javascript) upon clicking the form names.
The advantages are that 1) This method require only 1 database post 2) You dont need any special logic/temp table to display the data already entered by user in the previous form 3) No partially saving data ,when the user never actually submitted. (could be a disadvantage too if u plan to save partial data) 4) No page refresh required while changing between forms
only an option if you could afford to redesign the pages and if the current forms are not too complex.
If interested try google on ASP:PANEL .. i remeber seeing a very good article with code on how to use panels to achive this. This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Nicolas Keller |
last post by:
Hi!
I'm used to have Mozilla for testing my PHP sites when I'm coding. The
site's nearly finished, now I've made a test with the Internet
Exlporer... guess what... failed.
The problem: I'm...
|
by: Eric |
last post by:
Hey Everyone..
I have a form that has approximately 7 text fields and 1 checkbox.
Generally when this form is submitted(to itself BTW) it works fine,
however, when the checkbox is only field...
|
by: CJM |
last post by:
Can somebody clarify if/how/when a simple form is submitted when the <Enter>
key is pressed?
As I understood it, if you have a form with a single submit button, if enter
is pressed, the form...
|
by: Don |
last post by:
I have a need to submit a form, but don't need the user to click on a button. How do I do this? Is
there some way, using JavaScript, to setup a <form> tag to do this?
Thanks,
Don
----==...
|
by: Peter |
last post by:
I have 3 ASP.NET forms written in C#, I also have 3 frames (left, top and bottom) one for each form. My question is if I have data on one form in the bottom frame how do I access this data when I...
|
by: D. Shane Fowlkes |
last post by:
Sorry for the length of this post.
I have created a rather complex form which has a header/line item (parent
and child records) structure. It's for an intranet. A screenshot can be
seen here: ...
|
by: Alex Sibilev |
last post by:
Hello,
I have a really weird problem I've been trying to solve it without any luck
for the last couple of hours :(
I'm writing a "conference board" application (quite similar to ASP.NET...
|
by: John Boy |
last post by:
Hi,
Can anyone help. This is really doing my nut in. 3 years ASP exp. and
now doing .DOT which is a step in the wrong direction.
Basically I am left with the code of a guy who has left. When I...
|
by: Fester Bestertester |
last post by:
Greetings,
I'm an occasional php/mysql dabbler.
I have a basic data form with a submit button. Unfortunately, it's still
possible for the user to enter data changes and close the window,...
|
by: taylorcarr |
last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |