c# - how to add custom parameters to membership create user wizard? -


i confused right now. ive read solutions problem, every single 1 different.... people web applications projects , web site projects need different solutions.

what have in thoughts:

i have web application project

i created table userprofile in table store additional columns link image.

my problem right when call registeruser_createduser on submit, can't find way guid of newly created user :

 protected void registeruser_createduser(object sender, eventargs e)  {       formsauthentication.setauthcookie(registeruser.username, createpersistentcookie: false);        textbox imageurl = registeruserwizardstep.contenttemplatecontainer.findcontrol("imageurl") textbox;        userprofile.savenewprofileinformation("place new created user guid", imageurl.text);        string continueurl = registeruser.continuedestinationpageurl;        if (!openauth.islocalurl(continueurl))       {          continueurl = "~/";       }        response.redirect(continueurl); } 

how guid of new created user? , on right track @ solve problem?

you need created user username

{     formsauthentication.setauthcookie(registeruser.username, createpersistentcookie: false);      //if user created, username     membershipuser createduser = membership.getuser(registeruser.username);            guid userid = new guid(createduser.provideruserkey.tostring());      textbox imageurl = registeruserwizardstep.contenttemplatecontainer.findcontrol("imageurl") textbox;      //use userid above code     userprofile.savenewprofileinformation(userid, imageurl.text); } 

Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -