Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Professional
|
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional 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 March 13th, 2006, 06:24 PM
Authorized User
 
Join Date: Feb 2006
Posts: 17
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi!

Yes it finally worked! thank you so much for all the help :)

 
Old March 13th, 2006, 06:26 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Great. Glad it's working....

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old April 27th, 2006, 08:49 AM
Registered User
 
Join Date: Apr 2006
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Shell84,

Can I see a final copy of your CreateUserWizard? In trying to follow what you all were saying I missed something and can not get mine to work.

We have a verrrry slow network which makes trying to find problems difficult.

EaglePM

 
Old May 3rd, 2006, 01:19 AM
Registered User
 
Join Date: May 2006
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This thread has explained how to add a custom property, but what about removing a native property, like security question and answer. I can't seem to do this without the site not working.

 
Old May 3rd, 2006, 02:39 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Can you please start a new thread for a new topic instead of continuing this one? Makes it easier for everyone to find the right stuff.

Anyway, you need to reconfigure your provider in your web.config file, like this:

    <membership>
      <providers>
        <clear />
        <add name="AspNetSqlMembershipProvider"
type="System.Web.Security.SqlMembershipProvider, System.Web,
Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"
connectionStringName="LocalSqlServer"
enablePasswordRetrieval="false" enablePasswordReset="true"
requiresQuestionAndAnswer="true" applicationName="/"
requiresUniqueEmail="false" passwordFormat="Hashed"
maxInvalidPasswordAttempts="5" minRequiredPasswordLength="7"
minRequiredNonalphanumericCharacters="1" passwordAttemptWindow="10"
passwordStrengthRegularExpression="" />
      </providers>
    </membership>

This one is based on the default setting from the machine.config file. By adding this to your web.config file, you can override properties like requiresQuestionAndAnswer and minRequiredNonalphanumericCharacters

If you search Google or this forum for any of the terms in the config section, you'll find a lot of useful information.

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
 
Old June 19th, 2006, 12:08 PM
Registered User
 
Join Date: May 2006
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I just found this thread while researching the same problem myself. Here's what really threw me off.

If you create a seperate wizard step as explained in listing 16-7 of Pro ASP.NET 2.0 and declare the textbox in the new step the text box can be accessed in the script using the obvious

profile.Firstname = FirstName.text

But if you declare the same textbox in the CreateUserWizardStep step of ths wizard it cannot be seen by the script in the same way without the FindControl code you descripted above.

In fact, you can have two textboxes with the same id, one in the CreateUser step and one in a custom step and the compiler won't blink. Only the one in the custom step will be visible to the script.

Personally I think Microsoft's profile and membership components are pretty kludgy and this is a perfect example of why I say that. I'm strongly tempted to code this functionality myself.

 
Old June 19th, 2006, 04:27 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi terry ,

.NET controls are based on a concept called naming containers. This allows you to have controls with the same name, but in a different container.

In this case, you need to use FindControl on the appropriate container, as explained in the article by Scott Guthrie I linked to.

The good thing about the Login controls is that they are built on top of the Membership API. So, if you don't like the behavior, you can construct your own form and then manually call Membership.CreateUser. This way, you have full flexibility, while you can still use most of the .NET login features.

HtH,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
 
Old June 15th, 2007, 04:42 PM
Authorized User
 
Join Date: Jun 2007
Posts: 32
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
I am using CreateUserWizard control for user registration.
I have Oracle as datastore so I have implemented my own OracleMembership provider where I override the CreateUser method.
After user is created , I have added a wizard step for custom properties First Name, Last Name ,Department and Phone.

I would need to use these properties later to query such as show me users belonging to a particular department

I want to know, can I just have another table to store custom properties and write my own method to Save these on the Deactivation of wizard step. Or shd I write my own profileprovider for this.

which is a better choice?







Similar Threads
Thread Thread Starter Forum Replies Last Post
Reference Custom TextBoxes in CreateUserWizard wirerider ASP.NET 2.0 Basics 1 September 15th, 2006 10:00 PM
CreateUserWizard problem with custom step danblack101 ASP.NET 2.0 Professional 0 July 12th, 2006 01:09 AM
Populate custom properties of shape in Visio 2002 2bigfeet23 Pro Visual Basic 2005 0 April 11th, 2006 08:19 AM





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