Hi Vinay,
Sorry for posting answer late but was busy with work.
Yes, For eg: Suppose you have two web forms 1) login.aspx 2) home.aspx
In LOGIN.ASPX
when User is authorised to access the system its username is passed to home page.
Session.Add("sesUsername","txtUsername.Text")
Response.Redirect("Home.aspx")
In HOME.ASPX
In Page_Load event() write following code
If Not IsPostBack then
if Session("sesUsername")<>"" then
' Code whatever you want to write
else
Response.Redirect("login.aspx")
end if
End If
So, in short, the session variables which you pass from one page to another, then check the value of session variable to the other page(here HOME.ASPX) in Page_Load event. Check for the same in each and every page of the system.
I hope I can able to describe you.
If No, then I will send you some code.
Regards,
Chital Panchal
Enter your message below
Sign in or Join us (it's free).