R
Raj
Hi,
I am struggling with this for quite some time and thought will seek
your help on it. What I am doing is, I have Page1.aspx where user
inputs text into text boxes and also has a link to Page2.aspx. On
Page2.aspx user will input some more info and has two buttons 'Save'
and 'Cancel'. Both the buttons on Page2.aspx should take the user back
to Page1.aspx and the data entered by the user on Page1 should not be
lost. So, Response.Redirect is not an option since you lose data.
I tried PostBackURL and 'javascript:history.go(-1)' and that works but
here is my problem.
If user enters invalid data on Page2, clicking on 'Save' button should
not take the user back to Page1. But if I use PostBackURL it is doing
that way and I don't know how to control the event. In otherwords I
want the event to run only when valid data is entered. I can do
validation in btnSave_Click but don't know how to control the flow.
I will truly appreciate your input on the issue. Thank you,
Raj
I am struggling with this for quite some time and thought will seek
your help on it. What I am doing is, I have Page1.aspx where user
inputs text into text boxes and also has a link to Page2.aspx. On
Page2.aspx user will input some more info and has two buttons 'Save'
and 'Cancel'. Both the buttons on Page2.aspx should take the user back
to Page1.aspx and the data entered by the user on Page1 should not be
lost. So, Response.Redirect is not an option since you lose data.
I tried PostBackURL and 'javascript:history.go(-1)' and that works but
here is my problem.
If user enters invalid data on Page2, clicking on 'Save' button should
not take the user back to Page1. But if I use PostBackURL it is doing
that way and I don't know how to control the event. In otherwords I
want the event to run only when valid data is entered. I can do
validation in btnSave_Click but don't know how to control the flow.
I will truly appreciate your input on the issue. Thank you,
Raj