All,
For the life of me I can't figure out how to get the data from the two fields I have added and then insert it into my aspnet_Membership table.
I've added the two columns to the table.
Added this to my aspx page:
And this to my aspx.vb file:
But the FirstName and LastName textbox info is never inserted.
Thanks for the help!
For the life of me I can't figure out how to get the data from the two fields I have added and then insert it into my aspnet_Membership table.
I've added the two columns to the table.
Added this to my aspx page:
VB.NET:
<asp:SqlDataSource ID="SqlDataSource2" runat="server" ConnectionString="<%$ ConnectionStrings:teal_data %>" InsertCommand="INSERT INTO [aspnet_Membership] (FirstName, LastName) VALUES (@FirstName, @LastName)" ProviderName="ConnectionStrings:teal_data.CustomizedProvider">
<InsertParameters>
<asp:Parameter Name="FirstName" Type="String" />
<asp:Parameter Name="LastName" Type="String" />
</InsertParameters>
</asp:SqlDataSource>
And this to my aspx.vb file:
VB.NET:
Protected Sub CreateUserWizard1_CreatedUser(ByVal sender As Object, ByVal e As EventArgs)
Dim UserNameTextBox As TextBox = DirectCast(CreateUserWizardStep1.ContentTemplateContainer.FindControl("UserName"), TextBox)
Dim DataSource As SqlDataSource = DirectCast(CreateUserWizardStep1.ContentTemplateContainer.FindControl("SqlDataSource2"), SqlDataSource)
Dim User As MembershipUser = Membership.GetUser(UserNameTextBox.Text)
Dim UserGUID As Object = User.ProviderUserKey
DataSource.InsertParameters.Add("UserId", UserGUID.ToString())
DataSource.Insert()
End Sub
But the FirstName and LastName textbox info is never inserted.
Thanks for the help!