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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T06:55:33+00:00 2026-06-01T06:55:33+00:00

Maybe the question sounds silly. Who is the provider,in the above statement? Is it

  • 0

Maybe the question sounds silly.
Who is the provider,in the above statement?
Is it the programmer who provides the error needed,the user that creates a membership or someone else?
Specifically, i want to show error when the user types more than the maxlength characters as below:
ps. find the line with * in the geterrormessage method…

UsernameTextbox.MaxLength = 15;
    if (UsernameTextbox.Text.Length > UsernameTextbox.MaxLength)
    {
        status = MembershipCreateStatus.ProviderError;
        Msg.Text = GetErrorMessage(status);
    }


public string GetErrorMessage(MembershipCreateStatus status)
{
   switch (status)
  {


  case MembershipCreateStatus.DuplicateUserName:
    return "Username already exists. Please enter a different user name.";


  case MembershipCreateStatus.DuplicateEmail:
    return "A username for that e-mail address already exists. Please enter a different e-mail address.";

  case MembershipCreateStatus.InvalidPassword:
    return "The password provided is invalid. Please enter a valid password value.";

  case MembershipCreateStatus.InvalidEmail:
    return "The e-mail address provided is invalid. Please check the value and try again.";

  case MembershipCreateStatus.InvalidAnswer:
    return "The password retrieval answer provided is invalid. Please check the value and try again.";

  case MembershipCreateStatus.InvalidQuestion:
    return "The password retrieval question provided is invalid. Please check the value and try again.";

  case MembershipCreateStatus.InvalidUserName:
    return "The user name provided is invalid. Please check the value and try again.";
   //****** STAR LINE:i want to show the following message but i don't know if the-->
  //-->the provider error method can let me do this
  case MembershipCreateStatus.ProviderError:
    return "field outreached the maximum length of characters which is:";

  case MembershipCreateStatus.UserRejected:
    return "The user creation request has been canceled. Please verify your entry and try again. If the problem persists, please contact your system administrator.";

  default:
    return "An unknown error occurred. Please verify your entry and try again. If the problem persists, please contact your system administrator.";
   }
 }
  • 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-01T06:55:34+00:00Added an answer on June 1, 2026 at 6:55 am

    The Provider is the default MembershipProvider which is built in. You can specify your own implementation by creating a class which derives from MembershipProvider.

    Take a look at this tutorial on the MSDN: http://msdn.microsoft.com/en-us/library/yh26yfzy.aspx

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

Sidebar

Related Questions

OK, that question sounds maybe a little confusing so I'll try to explain it
Maybe the question sounds silly, but I don't understand 'something about threads and locking
I realize that this may sound like a silly question, but the last time
Maybe my question sounds a bit generic, so let me be more clear. I
I am sorry, that sounds like a noob question. I am trying to do
The question may at first sound silly, but maybe it isn't at all. Java
Maybe the question sound not good or too simple. But not for me in
Maybe the question is familiar but I need an explanation in this case. Let's
Maybe this question has been asked many times before, but I never found a
Maybe my question it's a little weird, but I'm trying to build a not-so-simple

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.