For example, in Login.aspx , I have two link.
<a href="Main.aspx?site=facebook">Facebook_link</a>
<a href="Main.aspx">Google_link</a> // (I wouldn't like to wirte "Main.aspx?site=google"
On Main Page_Load , there is :
if(Request.QueryString["site"].ToString()!="facebook")
{
.....
}
On Login page if I click Facebook_link and then I go to Main page, everything works great.
But on Login page if I click Google_link and then I go to Main page , I get error. [Error: Object reference not set to an instance of an object]
I know why I get this error.
I woud like to ask that it is possible to check on Main page that "If Request.QueryString["site"] is exist, do this".