Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8
This is the forum to discuss the Wrox book Beginning ASP.NET 2.0 by Chris Hart, John Kauffman, David Sussman, Chris Ullman; ISBN: 9780764588501
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 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 Display Modes
  #1 (permalink)  
Old May 30th, 2006, 04:47 PM
Authorized User
 
Join Date: Apr 2006
Location: Virginia Beach, VA, USA.
Posts: 35
Thanks: 0
Thanked 0 Times in 0 Posts
Default Data source control for Create User

I have an SqlDataSource for accessing table information located on a remote shared SQL Server. In this same database I have an existing Users table with custom field names. Can I use the CreateUserWizard control to connect to this data source for the purpose of adding new users. My Sql database is located on a remote server in a shared environment.

I cannot find a data source selection in the CreateUserWizard properties.
  #2 (permalink)  
Old May 30th, 2006, 05:16 PM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,948
Thanks: 79
Thanked 1,555 Times in 1,532 Posts
Default

Hi there,

You can take a look at this thread: http://p2p.wrox.com/topic.asp?TOPIC_ID=41084

It explains how to add additional information to the existing users.
If that's not enough, you need to write your own provider, which is not as bad as it sounds, although it means quite a lot of work.

This article is probably a good place to start: http://imar.spaanjaars.com/QuickDocId.aspx?QUICKDOC=380

Hope this helps,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
  #3 (permalink)  
Old August 16th, 2006, 12:40 PM
Registered User
 
Join Date: Aug 2006
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar,
I have reviewed the thread http://p2p.wrox.com/topic.asp?TOPIC_ID=41084
 and How to add a Login, Roles and Profile system to an ASP.NET 2.0 app in only 24 lines of code
I am doing exactly the same thing,creatinga new Listbox in teh create user.
But when i add the selectedvalue,it throws exception,which says myProfile.Education = CType(CreateUserWizard1.CreateUserStep.ContentTemp lateContainer.FindControl("Education"), DropDownList).SelectedValue

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

pls help me.
  #4 (permalink)  
Old August 16th, 2006, 12:43 PM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,948
Thanks: 79
Thanked 1,555 Times in 1,532 Posts
Default

Does it say where it crashes? That is, what object is null??

Have you tried setting a breakpoint, and by debugging looked at the variables and their values?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
  #5 (permalink)  
Old August 16th, 2006, 01:15 PM
Registered User
 
Join Date: Aug 2006
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I tried with try and catch ,and this is where the problem is
myProfile.Education = CType(CreateUserWizard1.CreateUserStep.ContentTemp lateContainer.FindControl("Education"), DropDownList).SelectedValue


  #6 (permalink)  
Old August 16th, 2006, 01:16 PM
Registered User
 
Join Date: Aug 2006
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

If this could help you guide me
[NullReferenceException: Object reference not set to an instance of an object.]
   _Default.CreateUserWizard1_CreatedUser(Object sender, EventArgs e) in D:\Projects\SQLProviderTest\Register.aspx.vb:11
   System.EventHandler.Invoke(Object sender, EventArgs e) +0
   System.Web.UI.WebControls.CreateUserWizard.OnCreat edUser(EventArgs e) +75
   System.Web.UI.WebControls.CreateUserWizard.Attempt CreateUser() +320
   System.Web.UI.WebControls.CreateUserWizard.OnNextB uttonClick(WizardNavigationEventArgs e) +107
   System.Web.UI.WebControls.Wizard.OnBubbleEvent(Obj ect source, EventArgs e) +412
   System.Web.UI.WebControls.CreateUserWizard.OnBubbl eEvent(Object source, EventArgs e) +123
   System.Web.UI.WebControls.WizardChildTable.OnBubbl eEvent(Object source, EventArgs args) +17
   System.Web.UI.Control.RaiseBubbleEvent(Object source, EventArgs args) +35
   System.Web.UI.WebControls.Button.OnCommand(Command EventArgs e) +86
   System.Web.UI.WebControls.Button.RaisePostBackEven t(String eventArgument) +155
   System.Web.UI.WebControls.Button.System.Web.UI.IPo stBackEventHandler.RaisePostBackEvent(String eventArgument) +7
   System.Web.UI.Page.RaisePostBackEvent(IPostBackEve ntHandler sourceControl, String eventArgument) +11
   System.Web.UI.Page.RaisePostBackEvent(NameValueCol lection postData) +33
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4919


  #7 (permalink)  
Old August 16th, 2006, 01:30 PM
Registered User
 
Join Date: Aug 2006
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar
myprofile.education value shows as null.

  #8 (permalink)  
Old August 16th, 2006, 02:01 PM
Registered User
 
Join Date: Aug 2006
Location: , , .
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar,pls help

  #9 (permalink)  
Old August 16th, 2006, 02:03 PM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,948
Thanks: 79
Thanked 1,555 Times in 1,532 Posts
Default

It could be null the first time, if a value hasn't been set before.

How did you set up the profile? Do you get Intelli Sense on the Education property?

And did you try debugging?

You can also try something like this:

Dim myDropDown As DropDownList = _
CType(CreateUserWizard1.CreateUserStep.ContentTemp lateContainer.FindControl("Education"), DropDownList)

Does that result in a valid DropDownList control when you debug it?

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
  #10 (permalink)  
Old August 16th, 2006, 02:04 PM
Imar's Avatar
Wrox Author
Points: 71,164, Level: 100
Points: 71,164, Level: 100 Points: 71,164, Level: 100 Points: 71,164, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 16,948
Thanks: 79
Thanked 1,555 Times in 1,532 Posts
Default

Quote:
quote:Originally posted by papa
 Hi Imar,pls help
 Hi again,

Messages like this don't help. If I have time, you get an answer. If I don't have time, you don't get an answer... ;)

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 


Thread Tools
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
Cannot create a connection to data source error mojo1979 BOOK: Professional SQL Server Reporting Services ISBN: 0-7645-6878-7 1 April 22nd, 2008 10:24 AM
Best Data Source Control to Use in ASP.Net 2.0 srotondo ASP.NET 2.0 Basics 2 January 23rd, 2008 04:30 PM
Create Dynamic User Control Prabhakar_dt ASP.NET 2.0 Professional 1 June 6th, 2007 07:30 AM
How to create reports based on TFS Source Control woojtii Visual Studio 2005 0 March 28th, 2007 04:16 AM
Cannot create a connection to data source dba123 Reporting Services 0 March 8th, 2006 03:46 PM



All times are GMT -4. The time now is 07:16 PM.


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