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

  • Home
  • SEARCH
  • 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 7775945
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T17:45:09+00:00 2026-06-01T17:45:09+00:00

This is the first post for me in this the greatest website. Is there

  • 0

This is the first post for me in this the greatest website.

Is there any possibility to change isValid property from OnCheckUserName function?If so how can I do that?

Actually in this example there is a code block which use web service:

    <script type="text/javascript">
       function OnloginIDValidation(s, e) {
            if (e.value.toString().length > 0) {
                e.errorText = "UserName is not available";
                PageMethods.CheckUserName(e.value.toString(), OnCheckUserName);
            }
        }
        function OnCheckUserName(unavailable) {
            if (unavailable == true) {
                e.isValid = true;
            }
            else if (unavailable != true) {
                e.isValid = false;
            }
        }
    </script>

    <asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
     <dx:ASPxTextBox ID="txt_loginID" runat="server" AssociatedControlID="txt_loginID">
          <InvalidStyle BackColor="#FFF5F5">
               <Border BorderColor="Red" BorderStyle="Solid" BorderWidth="1px" />
          </InvalidStyle>
          <ClientSideEvents Validation="OnloginIDValidation" />
     </dx:ASPxTextBox>
    </asp:Content>
    [WebMethod]
    public static bool CheckUserName(string userName)
    {
        if (Membership.GetUser(userName) != null)
        {
          return true;
        }
        else
        {
          return false;
        }
    }

    private void ApplyValidationSummarySettings()
    {
        vsValidationSummary1.RenderMode = (ValidationSummaryRenderMode)Enum.Parse(typeof(ValidationSummaryRenderMode), "BulletedList");
        vsValidationSummary1.ShowErrorAsLink = true;
    }

    private void ApplyEditorsSettings()
    {
        ASPxEdit[] editors = new ASPxEdit[] {txt_loginID};
        foreach (ASPxEdit editor in editors)
        {
            editor.ValidationSettings.ValidateOnLeave = true;
            editor.ValidationSettings.SetFocusOnError = true;
        }
    }

It doesn’t work
I hope to help me how can i fix it.
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-06-01T17:45:11+00:00Added an answer on June 1, 2026 at 5:45 pm

    Set ASPxTextBox.ClientInstanceName attribute to some value, e.g. textBox1. Then use ASPxClientTextBox.SetIsValid method in OnCheckUserName method.
    Like this:

        function OnCheckUserName(unavailable) {
            textBox1.SetIsValid(unavailable == true);
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

this is my first post on this website, but I'm all the time getting
this is my first post on this website, Anyway, I recently started trying to
This is my first post here, therefore apologize for any blunders. I'm developing a
This is my first post to this website. Here is my question: I want
This is my first post here so kindly pardon any mistakes that I have.
this is my first post. I have this function for reversing a string in
This is my first post in any forum so please bear with me. I
This is my first post here and I wanted to get some input from
This is my first post on this rather spiffing website so go easy on
this is my first post on stackoverflow, I hope you can help me out!

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.