|
Subject:
|
CreateUserWizard -access controls inside templates
|
|
Posted By:
|
vs
|
Post Date:
|
9/13/2006 9:01:36 PM
|
Hi I Customized create user wizard by adding field Phone Now I trying to access controls inside templated Create User wizard step1 And send Phone to customer table which I created, but it doesn’t work This is my code, any idea what is wrong. Thank you.
<script runat="server"> Sub CreateUserWizard1_CreatedUser(ByVal Sender As Object, ByVal E As EventArgs) Dim phone As TextBox phone = CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl("phone") Dim mydatasource As New SqlDataSource() mydatasource.ConnectionString = ConfigurationManager.ConnectionStrings("myConnectionString").ToString() mydatasource.InsertCommandType =SqlDataSourceCommandType.Text mydatasource.InsertCommand = "Insert into customer(phone) values (@phone)" mydatasource.InsertParameters.Add("phone", phone.Text) End Sub </script>
|
|