Wrox Programmer Forums
BOOK: Beginning ASP.NET 4.5 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-31180-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5 : in C# and VB 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 January 30th, 2016, 04:54 PM
Authorized User
Join Date: Aug 2015
Posts: 19
Thanks: 6
Thanked 0 Times in 0 Posts
Default CreateUserWizard - UserCreated Event

The background: I need to get the UserName to create an application table with UserName as a column.
I have created a wizard step to get 2 application text fields. When I click the Finish button on that step, I execute a wzCreateUser_FinishButtonClick subroutine. The first line is
Dim TheUser As String = User.Identity.Name
, and TheUser is available and I can then proceed to create the application table.
My Question: There is a CreatedUser event that nominally 'occurs after the membership provider has created a new Web Site user account'. However, when I code
Dim TheUser As String = User.Identity.Name
 Protected Sub wzCreateUser_CreatedUser(sender As Object, e As EventArgs) Handles wzCreateUser.CreatedUser
, TheUser is empty. Why? If the username has been created, where do I find it? I am finding this wizard to be a bit mysterious.
Thank you.
Old January 30th, 2016, 05:01 PM
Imar's Avatar
Wrox Author
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts

Hi there,

The user is created in that step, but not logged in yet. Redirect to a next page and try to access the name there.


Imar Spaanjaars
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!

Similar Threads
Thread Thread Starter Forum Replies Last Post
CreateUserWizard AghaKhan ASP.NET 2.0 Professional 1 December 5th, 2007 08:14 PM
CreateUserWizard michaelcode ASP.NET 2.0 Basics 2 February 5th, 2007 06:17 PM
CreateUserWizard elavio ASP.NET 2.0 Basics 1 November 18th, 2006 07:50 PM
CreateUserWizard michaelcode ASP.NET 2.0 Basics 1 August 19th, 2006 09:04 AM
CreateUserWizard zoltac007 ASP.NET 2.0 Basics 4 June 1st, 2006 04:08 PM

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