Wrox Programmer Forums
Go Back   Wrox Programmer Forums > .NET > .NET 2.0 and Visual Studio. 2005 > .NET Framework 2.0
|
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 13th, 2006, 09:01 PM
vs vs is offline
Registered User
 
Join Date: Sep 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default CreateUserWizard -access controls inside templates

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.ContentTemplateCo ntainer.FindControl("phone")

 Dim mydatasource As New SqlDataSource()
 mydatasource.ConnectionString = ConfigurationManager.ConnectionStrings("myConnecti onString").ToString()
 mydatasource.InsertCommandType =SqlDataSourceCommandType.Text
 mydatasource.InsertCommand = "Insert into customer(phone) values (@phone)"
 mydatasource.InsertParameters.Add("phone", phone.Text)
    End Sub
     </script>





Similar Threads
Thread Thread Starter Forum Replies Last Post
CreateUserWizard and Highlight controls psychonet BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 September 4th, 2007 06:45 PM
How to get to controls inside DataList? rsearing ASP.NET 2.0 Basics 1 March 1st, 2007 09:14 AM
Validation controls and FormView templates bpdsmark BOOK: Professional ASP.NET 2.0 and Special Edition; ISBN: 978-0-7645-7610-2; ISBN: 978-0-470-04178-9 1 September 28th, 2006 08:56 AM
referencing controls in templates in form_view djpotte ASP.NET 2.0 Basics 3 May 25th, 2005 04:23 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.