Maintain static URL using Master Pages
Question:
Sorry if this is something basic I have missed or physically can’t do but…
I have 3 ASP.Net pages (code behind C#) all using the same single Master Page, the pages flow in a sequential path.
Terms & Conditions -> Submission Form-> Successful submission
Since I have a Terms and Conditions page(Default.aspx) that users have to read and then click on the button “I Agree” to proceed, I use a Server.Transfer(“Submissionform.aspx”) to display the SubmissionForm page. The URL remains <website>/Default.aspx which is fine, until a postback happens and it changes to <website>/SubmissionForm.aspx (postback can’t be avoided, used <asp:UpdatePanel> where I could, but some controls I have override this and preform a full postback).
My main problem is that I don’t want users to know (easily) or be able to jump straight to the SubmissionForm page without going to the Terms & Conditions page first. I don’t mind if <website>/Default.aspx is always the URL that “appears” since that is the Terms & Condition page or something like that.
I don’t want to use iFrames.
Thanks in advance for any ideas or pointers.
Solution:
use sessions
on each page set session(“step”) = 1,2,3
say on page2, check session(“step”), if it is nothing server.transfer to page 1
if it is 1 and you are on page3, transfer it to page 2
same way, if session(“step”) is null and you are on page 3 transfer to page1
same way, if session(“step”) is 1 and you are on page 3 transfer to page2













Comments (0)
Trackbacks - Pingbacks (0)
Leave a Reply