I tried this one but I get an error :
The code behind is
And the error I get is :
Object reference not set to an instance of an object.
Source Error:
Line 29: object UserGUID = User.ProviderUserKey;
Line 30:
Line 31: DataSource.InsertParameters.Add("ΚΩΔΙΚΟΣ_ΔΙΑΧΕΙΡΗΣΤΗ", UserGUID.ToString());
Line 32: DataSource.Insert();
Line 33: }
Any help?
Thanx!
Code:
hxxp://w w w.shorttext.com/98jce9p
The code behind is
Code:
protected void CreateUserWizard1_CreatedUser(object sender, EventArgs e)
{
Roles.AddUserToRole(CreateUserWizard1.UserName, "Role1");
TextBox UserNameTextBox = (TextBox)CreateUserWizardStep1.ContentTemplateContainer.FindControl("UserName");
SqlDataSource DataSource = (SqlDataSource)CreateUserWizardStep1.ContentTemplateContainer.FindControl("InsertExtraInfo");
MembershipUser User = Membership.GetUser(UserNameTextBox.Text);
object UserGUID = User.ProviderUserKey;
DataSource.InsertParameters.Add("ΚΩΔΙΚΟΣ_ΔΙΑΧΕΙΡΗΣΤΗ", UserGUID.ToString());
DataSource.Insert();
}
And the error I get is :
Object reference not set to an instance of an object.
Source Error:
Line 29: object UserGUID = User.ProviderUserKey;
Line 30:
Line 31: DataSource.InsertParameters.Add("ΚΩΔΙΚΟΣ_ΔΙΑΧΕΙΡΗΣΤΗ", UserGUID.ToString());
Line 32: DataSource.Insert();
Line 33: }
Any help?
Thanx!