Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Aug 02, 2012 07:01 AM by anwar232
Participant
1510 Points
2244 Posts
Jul 20, 2012 08:44 PM|LINK
Hi,
I used Session["ID"] = 8
How to use if statement if(Session["ID"]==8) { //my code }
This code not works.
Regards, Dejan
Contributor
3421 Points
575 Posts
Jul 20, 2012 08:47 PM|LINK
use
if(((int)Session["ID"])==8)
Star
7784 Points
1232 Posts
Jul 20, 2012 08:48 PM|LINK
try
if((int)Session["ID"] == 8){ yourcode }
Member
12 Points
11 Posts
Aug 02, 2012 07:01 AM|LINK
Check this code.
if (Session["ID"] != null) {if (Convert.ToInt16(Session["ID"]) == 8){ //DO your code } }
Regards,
Anwar Sadat
programercek
Participant
1510 Points
2244 Posts
session if statement
Jul 20, 2012 08:44 PM|LINK
Hi,
I used Session["ID"] = 8
How to use if statement if(Session["ID"]==8) { //my code }
This code not works.
Regards,
Dejan
inquisitive_...
Contributor
3421 Points
575 Posts
Re: session if statement
Jul 20, 2012 08:47 PM|LINK
use
while(1)
Ahmed Moosa
Star
7784 Points
1232 Posts
Re: session if statement
Jul 20, 2012 08:48 PM|LINK
try
if((int)Session["ID"] == 8){ yourcode }
MCC - MCPD -MCTS
anwar232
Member
12 Points
11 Posts
Re: session if statement
Aug 02, 2012 07:01 AM|LINK
Hi,
Check this code.
if (Session["ID"] != null) {if (Convert.ToInt16(Session["ID"]) == 8){ //DO your code } }
Regards,
Anwar Sadat