I cannot understand completely what you are trying to convey.
But I have some advise for your code.
if(Session["empid"]==null || Session["empid"]!=null)
You have written code for If it is
NULL
or
Not NULL
then why there is need to specify condition if you want to pass in any of criteria.
if(Request.UrlReferrer==null)
Value of
UrlReferrer
is the string of the
URL
from which the current page is redirected.
So If it is null then It must be the initial request.
So your code will run in the case if it is first request.
If you got some points then investigate your code further, and if not succeed then put your code snippets which is running undesirably.
Please
vote and
Accept Answer if it Helped.