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




Ad
MBR BootFX
Best-of-breed application framework for .NET projects, developed by Matthew Baxter-Reynolds and MBR IT
 
 Copyright © Matthew Baxter-Reynolds 2001-2008. '.NET 247 Software Development Services' is a trading style of MBR IT Solutions Ltd.
Contact Us - Terms of Use - Privacy Policy - www.dotnet247.com