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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:01:48+00:00 2026-05-23T23:01:48+00:00

So i have a which i’m catching the event of it with the ClientValidationFunction.

  • 0

So i have a which i’m catching the event of it with the ClientValidationFunction.

The problem i’m having is, i’m doing some process with it and outcome of this process should determine whether the args.IsValid should be true or false. But the results i’m catching are in callback where i can’t seem to find a way to acces args.

I’ve defined a var Args globaly and tried to get the value from there; couldn’t get it.

I’ve tried to send it via userContext; no use (think it only accepts string).

I’ve tried to get the validator by document.getElementById, and i couldn’t find the args property. This one is the one i’m most logical to me but i can’t seem to find it.

The javascript code i wrote is as this;

function ValidateUserMail(oSrc, args) {
    var myField = document.getElementById('<%=RegisterUserWizardStep.ContentTemplateContainer.FindControl("Email").ClientID %>');
    PageMethods.IsMailAvailable(myField.value, OnSucceeded); 
}

//i need to edit args value from this function below.
function OnSucceeded(result, userContext, methodName) {
    if (methodName == "IsMailAvailable")
        if (!result) {
            var myValidator = document.getElementById('<%=RegisterUserWizardStep.ContentTemplateContainer.FindControl("UniqueEmailRequired").ClientID %>');
            myValidator.args = false; //doesn't work any ideas about the working property?
        }
}

and the code i wrote in aspx for validator is as this;

  <asp:RequiredFieldValidator ID="EmailRequired" runat="server" ControlToValidate="Email" 
  CssClass="failureNotification" ErrorMessage="E-mail is required." ToolTip="E-mail is required." 
  ValidationGroup="RegisterUserValidationGroup">*</asp:RequiredFieldValidator>

  <asp:CustomValidator ID="UniqueEmailRequired" runat="server" ControlToValidate="Email"
  CssClass="failureNotification" ErrorMessage="Unique E-mail is required." ToolTip="Unique E-mail is required."
  ValidationGroup="RegisterUserValidationGroup" ClientValidationFunction="ValidateUserMail">*</asp:CustomValidator>

Thanks a lot!


Update; rendered html for uniqueEmailValidator Javascript in browser;

    var MainContent_RegisterUser_CreateUserStepContainer_UniqueEmailRequired = document.all ? document.all["MainContent_RegisterUser_CreateUserStepContainer_UniqueEmailRequired"] : document.getElementById("MainContent_RegisterUser_CreateUserStepContainer_UniqueEmailRequired");
    MainContent_RegisterUser_CreateUserStepContainer_UniqueEmailRequired.controltovalidate = "MainContent_RegisterUser_CreateUserStepContainer_Email";
    MainContent_RegisterUser_CreateUserStepContainer_UniqueEmailRequired.errormessage = "Unique E-mail is required.";
    MainContent_RegisterUser_CreateUserStepContainer_UniqueEmailRequired.validationGroup = "RegisterUserValidationGroup";
    MainContent_RegisterUser_CreateUserStepContainer_UniqueEmailRequired.evaluationfunction = "CustomValidatorEvaluateIsValid";
    MainContent_RegisterUser_CreateUserStepContainer_UniqueEmailRequired.clientvalidationfunction = "ValidateUserMail";
  • 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-23T23:01:49+00:00Added an answer on May 23, 2026 at 11:01 pm

    there are two properties in args Value and IsValid

    try

        myValidator.args.Value = '3434';
        myValidator.args.IsValid = true or false ;
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We have some web pages which have two frames, with one frame in the
I'm about to start a new project which should have a rather large database.
I have some data like this: 1 2 3 4 5 9 2 6
I need to know which views does a user have which privileges on. I'm
I have 2 time values which have the type datetime.time . I want to
I have two collections which have property Email in both collections. I need to
I have GridView which I can select a row. I then have a button
I have two LINQ objects which have exactly the same columns and I would
I have UserControl which contains a TextBox and a Button control. The Button opens
I have ControlA which accepts an IInterfaceB which has a property of type List<unknownType>

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.