Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 1.0 and 1.1 Basics ASP.NET discussion for users new to coding in ASP.NET 1.0 or 1.1. NOT for the older "classic" ASP 3 or the newer ASP.NET 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 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
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old August 28th, 2006, 04:20 AM
Authorized User
Points: 67, Level: 1
Points: 67, Level: 1 Points: 67, Level: 1 Points: 67, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: , , Malta.
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
  #2 (permalink)  
Old August 28th, 2006, 07:40 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

Well, I am assuming that the value of getcccode != 456

(Since you posted this in the .NET forum I am assuming you are using .NET)
Some things to check, you declare codestate like this:

Dim codestate (While you can do this is in .NET and the variable has type system.object, its good practice to declare the variables type.)

Your if statement it checking the variable getccode (which you havent supplied to show us what the value of getcccode is) but i am assuming that the value is 456.

Are you sure the that Querystring varible is 456?

"The one language all programmers understand is profanity."
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
IF statement problems - please help ivanv Classic ASP Basics 2 August 31st, 2006 03:10 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.