Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
|
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 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 February 28th, 2009, 01:42 PM
Friend of Wrox
 
Join Date: Mar 2008
Posts: 133
Thanks: 15
Thanked 1 Time in 1 Post
Send a message via ICQ to iceman90289 Send a message via AIM to iceman90289
Default Object reference not set to an instance of object

ok. so my function:

Code:
CreateUserProfile(
((TextBox)CreateUserWizard1.FindControl("UserName")).Text.ToString(),
((TextBox)CreateUserWizard1.FindControl("txtFirstName")).Text.ToString(),
((TextBox)CreateUserWizard1.FindControl("txtLastName")).Text.ToString(),
((TextBox)CreateUserWizard1.FindControl("Password")).Text.ToString(),
((TextBox)CreateUserWizard1.FindControl("Email")).Text.ToString(),
((DropDownList)CreateUserWizard1.FindControl("ddlQuestion")).SelectedValue,
((TextBox)CreateUserWizard1.FindControl("txtAnswer")).Text.ToString());
is where the error is. im trying to get input from text boxes in the create user wizard control. i had a post like this a while back and used that as an example... idk what i did differently besides not using the ToString() at the end. im gona try it again without that but i dont think thats the error... any ideas?
 
Old March 1st, 2009, 05:13 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Did you set a break point on this method and then looked at the individual controls? Do any of them return a valid value?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Object reference not set to an instance of an obje hertendreef ASP.NET 2.0 Basics 3 July 1st, 2007 02:16 PM
Object Reference not set to an instance of object srinivas_chakka ASP.NET 1.0 and 1.1 Professional 0 February 8th, 2006 11:56 AM
Object Reference is Not Set to an Instance of an O blackinwhite General .NET 4 February 1st, 2005 05:42 AM
Object reference not set to an instance... steelman BOOK: ASP.NET Website Programming Problem-Design-Solution 6 May 7th, 2004 02:03 AM





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