Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 2.0 > ASP.NET 2.0 Basics
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
ASP.NET 2.0 Basics If you are new to ASP or ASP.NET programming with version 2.0, this is the forum to begin asking 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 Basics 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 December 27th, 2006, 02:58 PM
Friend of Wrox
 
Join Date: Jul 2006
Location: olathe, ks, USA.
Posts: 238
Thanks: 0
Thanked 2 Times in 2 Posts
Send a message via MSN to rsearing
Default CreateUserWizard Complete Step

I am actually creating a site where an admin can use the createUserWizard to create users via the web app, rather than having to go through the wizard in VS 2005.

The problem is that as I go through the wizard and create a user, on the complete step it actually tries to login with that account that I am creating.

How can I override the last step to simply just alert me that it was created successfully and allow me to remain logged in as an admin and just refresh the userlogin page I created?

Thanks, in advance,
Rob

Actually--Imar pointed out a property called LoginCreatedUser that can be set to false..but I don't know where to put that..Also, I would like to re-direct (upon completion) to the createuser.aspx page that I created..I am not sure of the code that I would type. I would assume I would put this code on the "complete" button click event?
Reply With Quote
  #2 (permalink)  
Old December 27th, 2006, 04:38 PM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi Rob,

Just set LoginCreatedUser to false, like this:
Code:
<asp:CreateUserWizard ID="CreateUserWizard1" runat="server" LoginCreatedUser="False">
  <WizardSteps>
    <asp:CreateUserWizardStep runat="server">
    </asp:CreateUserWizardStep>
    <asp:CompleteWizardStep runat="server">
    </asp:CompleteWizardStep>
  </WizardSteps>
</asp:CreateUserWizard>
In addition to that you can handle the CreatedUser event and, for example, redirect away:
Code:
Protected Sub CreateUserWizard1_CreatedUser(ByVal sender As Object, _
      ByVal e As System.EventArgs) Handles CreateUserWizard1.CreatedUser
  Response.Redirect("SomePage.aspx")
End Sub
Hope this helps,

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
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
need a step by step book angelica ASP.NET 3.5 Basics 5 October 31st, 2008 05:06 AM
AjaxMAIL Step by Step waffa BOOK: Professional Ajax ISBN: 978-0-471-77778-6 3 September 25th, 2006 02:12 PM
CreateUserWizard problem with custom step danblack101 ASP.NET 2.0 Professional 0 July 12th, 2006 01:09 AM
We Based Database Step By step desireemm SQL Language 1 October 15th, 2005 08:15 PM
Step by step installation peter_budo Beginning PHP 0 August 31st, 2004 12:04 PM



All times are GMT -4. The time now is 10:20 PM.


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