hello sir,
i am having a doubt in retriving previous page URL.
I am using below code to get previous page URL. It working fine on my local machine. but i have not tested on live server since my company have not yet purchase SSL certification.
all my pages are SSL certified (HTTPS).
I had come across a question on stackoverflow which states that (UrlReferrer) won't work if pages are in https form.
my application flow
it is a 3 step registration process.
we are not allowed to pass any data through querystring.
1. after successful completion of step1, I store a value in session which is been checked on step2
2. Session is checked of step 1 and after successful completion on step2, I store a value in session which is been checked on step3.
3. Session is checked of step 2 and after successful completion on step3 it get diverted to Dashboard.
all three pages are under one project only
if (Request.UrlReferrer != null)
{
if (!Request.UrlReferrer.ToString().ToLower().Contains("/registration/step2"))
{
Response.Redirect("/registration/step1", false);
}
}
else
{
Response.Redirect("/registration/step1", false);
}