Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > .NET > .NET 2.0 and Visual Studio. 2005 > .NET Framework 2.0
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
.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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 13th, 2006, 09:01 PM
vs vs is offline
Registered User
 
Join Date: Sep 2006
Location: , , .
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>
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 11:01 AM.


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