Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 5th, 2008, 02:21 AM
Registered User
 
Join Date: Mar 2008
Location: Margao, Goa, India.
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Radio button

if(all.Checked)
        {
           query="Select * from applicant_info";
        }
        else if(follow_up.Checked)
        {
             query="Select * from applicant_info";
        }

hi,
i m using asp classic with code behind language as c#.
Here i hv used radio buttn.now i want to check which button i hv selected using if statement.Bt m gettin an error

 System.NullReferenceException: Object reference not set to an instance of an object.



  #2 (permalink)  
Old March 5th, 2008, 05:17 AM
samjudson's Avatar
Friend of Wrox
Points: 8,687, Level: 40
Points: 8,687, Level: 40 Points: 8,687, Level: 40 Points: 8,687, Level: 40
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

ASP Classic? That is what most people call the pre-.Net version of ASP, written in VBScript. I suspect that's not what you are talking about.

If you are posting to the C#2005 forum then I hope you are using ASP.Net 2.0, otherwise you're on the wrong forum.

If you are getting a NullReferenceException then it means one of your variables is null. The exception should have given you a line number. Knowing this will most likely let you know which variable it is.

/- Sam Judson : Wrox Technical Editor -/
  #3 (permalink)  
Old March 16th, 2008, 06:43 AM
Friend of Wrox
 
Join Date: Mar 2007
Location: Hampshire, United Kingdom.
Posts: 432
Thanks: 0
Thanked 1 Time in 1 Post
Default

samjudson is right on the mark there!

The stack trace output by the exception should indicate the line that is failing..

Its important you get used the information provided by the Exception and debugging tools to overcome these issues, as well of course as identifying your development platform ;)

Rob
The Developing Developer
Currently Working Towards: MCAD C#
My Blog: http://www.robzyc.spaces.live.com
<center>"Nothing can stop the man with the right mental attitude from achieving his goal;
nothing on earth can help the man with the wrong mental attitude".

Thomas Jefferson</center>
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
radio button anwarraja Javascript 3 September 18th, 2007 08:18 PM
Radio button Jolley_tolson Javascript 2 July 15th, 2007 05:50 AM
radio-button grstad HTML Code Clinic 3 February 28th, 2006 08:32 AM
Button acts depending on radio button values janise Access 4 March 10th, 2004 12:53 AM
radio button damnnono_86 Access 5 October 28th, 2003 02:17 AM



All times are GMT -4. The time now is 01:36 AM.


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.