Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 28th, 2006, 08:09 AM
Authorized User
 
Join Date: Jun 2003
Posts: 12
Thanks: 1
Thanked 0 Times in 0 Posts
Default IF statement problems - please help

I can't figure out why this is not working for me.

Dim codestate
codestate = 456
if getcccode = CInt(Request.QueryString("cc_code"))then
codestate = 1
Else
codestate = 0
end If

When I do it "if getcccode = 456 then" it will work perfectly.

Can anyone please tell me what I am missing.

Thanks
 
Old August 28th, 2006, 09:02 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

I responded to this in the .NET forum. Even so, my questions are still relevant because your question isn't specific to the framework.

I don't think your missing anything, I think the value coming across the query string is not the value you are expecting and is causing your else statement to be executed.

"The one language all programmers understand is profanity."
 
Old August 31st, 2006, 03:10 AM
Authorized User
 
Join Date: Jul 2004
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to AFei
Default

 Request.QueryString("cc_code") maybe is empty value

You use "Response.Write" to output Request.QueryString("cc_code")






Similar Threads
Thread Thread Starter Forum Replies Last Post
IF statement problems - please help ivanv ASP.NET 1.0 and 1.1 Basics 1 August 28th, 2006 07:40 AM
SQL Statement problems tdaustin Classic ASP Basics 1 May 30th, 2005 07:16 PM
Problems with GROUP BY and CASE statement karim SQL Server 2000 2 September 23rd, 2004 06:39 AM
Problems with my Insert Statement brendan82 Access 1 January 6th, 2004 08:30 AM
Problems with my Insert Statement brendan82 Beginning VB 6 1 January 6th, 2004 08:14 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.