The CreateUserWizard fires a UserCreated event. Once that's fired, you can
access the Username and Password properties of the control. With the Username
if you need to you should be able to call into the Membership class to get
anything else you need.
-Brock
DevelopMentor
http://staff.develop.com/ballen
Brock, I am new to security in Asp.net 2.0. Can you provide some
example of how to get the last created userid using the
membershipclass?
Thank you
Rod
> The CreateUserWizard fires a UserCreated event. Once that's fired, you can
> access the Username and Password properties of the control. With the Username
[quoted text clipped - 18 lines]
> >
> > Thanks Rod
Brock Allen - 25 Jul 2005 17:41 GMT
<asp:CreateUserWizard runat=server ID=_createUser OnCreatedUser="_createUser_CreatedUser"></asp:CreateUserWizard>
<script runat="server">
protected void _createUser_CreatedUser(object sender, EventArgs e)
{
string name = _createUser.UserName;
MembershipUser user = Membership.GetUser(name);
object key = user.ProviderUserKey;
}
</script>
-Brock
DevelopMentor
http://staff.develop.com/ballen
> Brock, I am new to security in Asp.net 2.0. Can you provide some
> example of how to get the last created userid using the
[quoted text clipped - 24 lines]
>>>
>>> Thanks Rod
Rodusa - 25 Jul 2005 19:56 GMT
I see that you assume that the the login name should be unique. Anyhow,
this is perfect and works great.
Thanks for your fast response.
Rod
Brock Allen - 25 Jul 2005 20:10 GMT
The login name is unique within the scope of the application. That's the
Membership model.
-Brock
DevelopMentor
http://staff.develop.com/ballen
> I see that you assume that the the login name should be unique.
> Anyhow, this is perfect and works great.
>
> Thanks for your fast response.
>
> Rod
Mateusz Kierepka - 29 Dec 2005 07:39 GMT
I have one additional question:
How can I use only email instead using UserID? I try to set
RequireEmail="False" and use only UserName, but validation always says
your's email is in wrong format...
Regards
Mateusz www.Kierepka.pl ;)
Dominick Baier [DevelopMentor] - 29 Dec 2005 08:53 GMT
Hi,
you can set email requirements on the control and the provider - have you
set both??
---------------------------------------
Dominick Baier - DevelopMentor
http://www.leastprivilege.com
> I have one additional question:
> How can I use only email instead using UserID? I try to set
[quoted text clipped - 3 lines]
> Mateusz www.Kierepka.pl ;)
> *** Sent via Developersdex http://www.developersdex.com ***