Hi akhter,
This is compile time warning because type of Session["admin_id"] is object.
Therefore operator overloading chooses the ==(object, object) overload which is just a reference identity comparison.
Add .ToString() to Session["admin_id"] to get the string value for comparison.
akhter says:
if (Session["admin_id"] == "-1")
Change above with below.
if (Session["admin_id"].ToString() == "-1")