Posted on: 4/10/2014 7:47:11 PM | Views : 370

My code is as follows. when I run Home.aspx the login works fine. But when open dashboard.aspx by manually entering into browser then also it open the dashboard.aspx which should not happen.  Instead the dashboard.aspx should only open when successful login. What should I do?
try { classfile ob = new classfile(); ds = ob.Validate_admin(tb1.Text.Trim(), tb2.Text.Trim()); //ds = ob.Validate_info(TextBox1.Text.Trim(), TextBox2.Text.Trim());
if (ds.Tables[0].Rows.Count > 0) { Session["ss1"] =tb1.Text; Response.Redirect("dashboard.aspx");
} else { string display = "Invalid login !! Try Again"; ClientScript.RegisterStartupScript(this.GetType(), "myalert", "alert('" + display + "');", true); //Response.Write("Invalid Username or Password, Try Again!"); tb1.Text = null; tb2.Text = null;
} }< ...

Go to the complete details ...