Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Professional If you are an experienced ASP.NET programmer, this is the forum for your 2.0 questions. Please also see the Visual Web Developer 2005 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 2.0 Professional 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
  #1 (permalink)  
Old May 8th, 2007, 05:09 PM
Registered User
 
Join Date: May 2007
Location: Brentwood, TN, USA.
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default CreateUser Error

Also I'm having a rather odd error in the code-behind of the createuser page:

Partial Class CreateUser
    Inherits System.Web.UI.Page

    Protected Sub CreateUserWizard1_CreatedUser(ByVal sender As Object, ByVal e As System.EventArgs) Handles CreateUserWizard1.CreatedUser

        Dim pc As ProfileCommon = New ProfileCommon()
        pc.Initialize(CreateUserWizard1.UserName.ToString( ), True)

        pc.FirstName = FirstName.Text
        pc.LastName = LastName.Text
        pc.TechNumber = TechNumber.Text
        pc.Phone = Phone.Text

        pc.Save()
    End Sub
End Class

I get:
Name 'FirstName' is not declared.
Name 'LastName' is not declared.
Name 'TechNumber' is not declared.
Name 'Phone' is not declared.

...
<tr>
                            <td align="right" style="height: 26px">
                                <asp:Label ID="FirstNameLabel" runat="server" AssociatedControlID="FirstName">First Name:</asp:Label></td>
                            <td style="height: 26px">
                                <asp:TextBox ID="FirstName" runat="server"></asp:TextBox>
                                <asp:RequiredFieldValidator ID="FirstNameRequired" runat="server" ControlToValidate="FirstName"
                                    ErrorMessage="First name is required." ToolTip="First name is required." ValidationGroup="CreateUserWizard1">*</asp:RequiredFieldValidator>
                            </td>
                        </tr>
...
  #2 (permalink)  
Old May 9th, 2007, 01:15 AM
Registered User
 
Join Date: Mar 2007
Location: , , .
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default

did you addthe firstname , lastname controls to your create user wizard .. if u have added to that ..
u change your coding like this

p.FirstName = ((TextBox)CreateUserWizard1.CreateUserStep.Content TemplateContainer.FindControl("Firstname")).Text;
p.Lastname= ((TextBox)CreateUserWizard1.CreateUserStep.Content TemplateContainer.FindControl("Lastname")).Text;

did you add your profile to web.config ?



Similar Threads
Thread Thread Starter Forum Replies Last Post
Insert Query Error & Run-Time Error 3022 DavidWE Access 1 July 31st, 2008 11:17 AM
Ch 4: Parse error: syntax error, unexpected T_SL hanizar77 BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 June 23rd, 2008 09:17 PM
VB Error: Syntax Error or Access Violation codehappy VB How-To 7 October 3rd, 2007 05:41 PM
Saving personalization properties w/CreateUser k8277 ASP.NET 2.0 Basics 0 April 5th, 2007 01:47 PM
Phile Page error, visual studio error reps BOOK: ASP.NET Website Programming Problem-Design-Solution 0 September 27th, 2003 10:11 AM





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