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 8405737
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T22:54:41+00:00 2026-06-09T22:54:41+00:00

My page is a registration page, where a user enters a username, e-mail address

  • 0

My page is a registration page, where a user enters a username, e-mail address and password. Here is my code behind:

protected void Page_Load(object sender, EventArgs e)
{
}

protected void btnRegister_Click(object sender, EventArgs e)
{
    if (!Page.IsValid)
        return;
}

protected void cvEmail_ServerValidate(object source, ServerValidateEventArgs args)
{
    args.IsValid = false;
}

Here is my page:

<asp:ValidationSummary ID="vs" runat="server" />

<asp:TextBox ID="txtUsername" runat="server" />
<asp:TextBox ID="txtEmail" runat="server" />
<asp:TextBox ID="txtPassword" runat="server" TextMode="Password" />

<asp:Button ID="btnRegister" runat="server" OnClick="btnRegister_Click" />

<asp:CustomValidator ID="cvEmail" runat="server" ControlToValidate="txtEmail" 
    OnServerValidate="cvEmail_ServerValidate"
    ErrorMessage="Invalid Email" />

So the problem is that if custom validator fails, when the page reloads with my error message, my textboxes are empty. But the weird thing is that if I inspect the textbox elements in Firebug, the value of the input is set, it’s just not showing up on the page for some reason.

I’ve tried setting EnableViewState to true on the textbox and on the page, and that didn’t help.

Anyone know what I’m doing wrong?

  • 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-06-09T22:54:42+00:00Added an answer on June 9, 2026 at 10:54 pm

    Do you have JavaScript validation turned on? Or any other JavaScript touching these fields?

    If you see it in the page markup, but it does not show up in the browser, something is changing them after the page loads. Probably Javascript.

    This would also support the findings posted in the question comments that the same code works in another project (which doesn’t share the same JavaScript on the page).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

For a registration page where the user enters their contact information and their username
Here is the scenario: User enters the registration page. After filling out his/her details
The default user registration page in Drupal 7 has fields to enter a username,
All the authentication plugins I've seen are implementing one-page user registration - user enters
I'm trying to create a User Registration page in ASP.NET and wondering what is
I have a registration page with the following code below: in the views: def
I have a registration form that when the user enters in valid registration data
I have a simple user registration page in my rails app that has two
I have made customized user registration page. and i have made that on theme
So I have this empty textboxes in a registrationg page. The user enters some

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.