Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 835079
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:46:06+00:00 2026-05-15T04:46:06+00:00

I am creating a .NET website, and this is my first time using a

  • 0

I am creating a .NET website, and this is my first time using a createuserwizard control.

I need to pre-fill the email address for users (the website is by invitation only) and disable it. However, the email field still needs to be required.

I have managed to edit the template and disable the email field, and fill it programatically in the .aspx.cs file. However, when I disable the email field and pre-fill it, the createuserwizard form will not submit. It treats the email field as if it were empty and always returns me to the create user page, with a red asterisk by the email field. This happens even if I set the RequireEmail property to False.

Is there a way to force users to register with a given email address? I had hoped the createuserwizard would make my life easier, but so far it hasn’t. Thanks.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T04:46:07+00:00Added an answer on May 15, 2026 at 4:46 am

    I’ve done something like this – in my case I didn’t want a separate username, I used their email address as their username (and didn’t allow them to change it), so I did:

    • in the markup, set Email to ReadOnly=”true” and UserName to Visible=”false”
    • in Page_Load, inside if (!postback), set the Email textbox to Text to the email address and set ReadOnly to true
    • in the CreatingUser event, set UserName.Text = Email.Text

    That’s all it took for me – if you don’t care about forcing the username, I’d recommend hooking up to the CreatingUser event and inspect the email Text property to make sure it’s set properly. Perhaps something else is clearing it after you’ve set it.

    FWIW, in my codebehind I added a couple of properties to make it easier to access those textboxes, although there’s likely better ways of doing this 🙂

        private TextBox UserName {
            get { return GetWizardControl<TextBox>("UserName"); }
        }
    
        private TextBox Email {
            get { return GetWizardControl<TextBox>("Email"); }
        }
    
        private T GetWizardControl<T>(string id) where T : Control {
            return (T)CreateUserWizard1.CreateUserStep.ContentTemplateContainer.FindControl(id);
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i m using c# for first time in a asp.net website, in which i
I'm creating a ASP.NET .NET 4.0 website and part of this site requires that
When creating a website using Asp.Net and using controls such as the ListView is
I am creating a website using ASP.NET that supports multiple languages. For that I
i'm creating a shopping website that will sell computer parts using MVP and asp.net.
I'm creating my first ASP.NET MVC 3 website for my company's intranet. It's a
I am creating an ASP.NET website witch forces users to accept a disclaimer. When
I'm creating a WiX-based installer for my .NET-based website. Part of this website involves
Visual Studio 2010 MSSQL 2005 Windows Vista I am creating an ASP.NET website using
I'm creating a ASP.NET MVC website and I was wandering which techniques do you

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.