C# security Question
Hi I'm wanting to be able to create a user in the aspnetdb membership table with just a username, tmp password, and their email (these are known people), send an email to them and a link to have them fill out the security question and insert/update/change their password, and I seem to be having problems with that. I'm trying to use the Membership.CreateUser control but, I it's not working for me.. can you help? suggestions? links? examples?
Loading
Kirtan PatelPosted Dec 19, 2009, 11:17 PM
you can Create New User Using Following code may be you where doin miskate some where .. just take a look at below code
//Import below First
using System.Web.Security;
//then Write code like below
protected void Button1_Click(object sender, EventArgs e)
{
MembershipCreateStatus status;
Membership.CreateUser("testUser", "12345!@#","[email protected]","Sec Question","Sec Answer",true,out status);
if (status == MembershipCreateStatus.Success)
{
Response.Write("User Create Success full");
}
}
kiran kumarPosted Dec 19, 2009, 9:54 PM