Do this.
protected void Page_Load(object sender, EventArgs e)
{
if (Session["loggedusername"])==null)
{
Response.Redirect("adminlogin.aspx");
}
}
Check at the page where you set the value that,
ds.Tables[0].Rows[0].ItemArray[1].ToString()
contains value.
Regards..:laugh: