.NETGURU
Proper IF statement
Messages   Related Types
This message was discovered on ASPFriends.com 'aspngvb' list.


Kevin b
-- Moved from [aspngfreeforall] to [aspngvb] by Tim Musschoot <Click here to reveal e-mail address> --

I have an IF statement like the following. Is there a more logical way of
doing this?

If Request.Cookies("CookieName") Is Nothing Then
'Do Nothing
Else
Response.Redirect("Page.asp")
End IF

Thanks

_________________________________________________________________
Join the world's largest e-mail service with MSN Hotmail.
http://www.hotmail.com

Reply to this message...
 
    
Peter Erwin

how's this?

<%
'redirect if cookie exists
If request.cookies("CookieName") <> "" Then =
Response.Redirect("page.asp")
%>

-----Original Message-----
From: Kevin b [mailto:Click here to reveal e-mail address]
Sent: Thursday, July 25, 2002 8:01 AM
To: aspngvb
Subject: [aspngvb] Proper IF statement

-- Moved from [aspngfreeforall] to [aspngvb] by Tim Musschoot =
<Click here to reveal e-mail address> --

I have an IF statement like the following. Is there a more logical way =
of=20
doing this?

If Request.Cookies("CookieName") Is Nothing Then
'Do Nothing
Else
Response.Redirect("Page.asp")
End IF

Thanks

_________________________________________________________________
Join the world's largest e-mail service with MSN Hotmail.=20
http://www.hotmail.com
| [aspngvb] member Click here to reveal e-mail address =3D YOUR ID
| http://www.asplists.com/asplists/aspngvb.asp =3D JOIN/QUIT

Reply to this message...
 
    
hassan.hussein@zurich.com

and this

If Not Request.Cookies("CookieName") Is Nothing Then
Response.Redirect("Page.asp")
End IF

Hassan

"Peter Erwin"
<pete@tomsnyd To: "aspngvb" <Click here to reveal e-mail address>
er.com> cc:
Subject: [aspngvb] RE: Proper IF statement
25/07/2002
06:27 PM
Please
respond to
"aspngvb"

how's this?

<%
'redirect if cookie exists
If request.cookies("CookieName") <> "" Then Response.Redirect("page.asp")
%>

-----Original Message-----
From: Kevin b [mailto:Click here to reveal e-mail address]
Sent: Thursday, July 25, 2002 8:01 AM
To: aspngvb
Subject: [aspngvb] Proper IF statement

-- Moved from [aspngfreeforall] to [aspngvb] by Tim Musschoot
<Click here to reveal e-mail address> --

I have an IF statement like the following. Is there a more logical way of
doing this?

If Request.Cookies("CookieName") Is Nothing Then
'Do Nothing
Else
Response.Redirect("Page.asp")
End IF

Thanks

_________________________________________________________________
Join the world's largest e-mail service with MSN Hotmail.
http://www.hotmail.com
| [aspngvb] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngvb.asp = JOIN/QUIT

| [aspngvb] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngvb.asp = JOIN/QUIT

Reply to this message...
 
    
suresh kumar
try this
If trim(Request.Cookies("CookieName")) <> "" Then
Response.Redirect("Page.asp")

[Original message clipped]

_________________________________________________________________
Send and receive Hotmail on your mobile device: http://mobile.msn.com

Reply to this message...
 
    
El Waltero
I like ...

If Not (Request.Cookies("CookieName") Is Nothing)
    ' Do Something!
    Response.Redirect("Page.asp")
End If

.walter

-----Original Message-----
From: Kevin b [mailto:Click here to reveal e-mail address]
Sent: Thursday, July 25, 2002 8:01 AM
To: aspngvb
Subject: [aspngvb] Proper IF statement

-- Moved from [aspngfreeforall] to [aspngvb] by Tim Musschoot
<Click here to reveal e-mail address> --

I have an IF statement like the following. Is there a more logical way
of
doing this?

If Request.Cookies("CookieName") Is Nothing Then
'Do Nothing
Else
Response.Redirect("Page.asp")
End IF

Thanks

_________________________________________________________________
Join the world's largest e-mail service with MSN Hotmail.
http://www.hotmail.com
| [aspngvb] member Click here to reveal e-mail address = YOUR ID
| http://www.asplists.com/asplists/aspngvb.asp = JOIN/QUIT
-

-

Reply to this message...
 
 
System.Web.UI.Page




ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
Ad


Need Dot Net Interview Questions?
Ask ExamGuru, Inc. for advice and help on Passing .Net Interviews
.Net Projects
Best-of-breed application framework for .NET projects, developed by ExamGuru, Inc. and ExamGuru IT
Free .net Help
Commission ExamGuru, Inc. and his team for your next bespoke software project
FogBUGZ
The only bug tracking system carefully crafted with one goal in mind: helping teams create great software.
Awesome Tools
If you don't know about these, you're missing out... IT Certification Questions
IT Interview Questions
Free Oracle 10g Training
MCSE Boortcamp
Cisco Study Guides
Cheap Study Guides
Exact Questions
Dot Net Interview Questions
Oracle OCP
Cheap Travel
Designer Perfumes - Wholesale Prices
Free Programming Tutorials
 
ExamGuru IT Solutions - .Net Guru is owned and operated by ExamGuru, Inc., the man behind .Net Guru. If you're in the market for bespoke software or software consultancy, why not get him and his highly trained team to help? - www.examguru.net/ITCertification
 Copyright © ExamGuru, Inc. 2001-2006
Contact Us - Terms of Use - Privacy Policy - www.dot-net-guru.com - www.examguru.net - www.oraclesource.net - www.itinterviews.net - www.examguru.net/ITCertification