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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:42:07+00:00 2026-06-16T02:42:07+00:00

I’ve read several posts about this issue (here and in other sites) but no

  • 0

I’ve read several posts about this issue (here and in other sites) but no one is working for me. I’m trying to check if a given email is already registered in a database during the register process.

I’ve a page called Register.aspx in which I’ve declared the follow JavaScript function:

function check_email_availability(src, args) {
  $.ajax({
    type: "POST",
    async: false,
    timeout: 500,
    contentType: "application/json",
    url: "Register.aspx/CheckEmailAvailability",
    data: "{ 'email' : '" + args.Value + "' }",
    success: function (result) {
      args.IsValid = result.d;
    }
  });
}

In the other hand, in the code behind in Register.aspx.vb, I’ve the follow WebMethod:

<System.Web.Services.WebMethod()> _
Public Shared Functiion CheckEmailAvailability(ByVal email As String) As String
  If Membership.GetUser(email) Is Nothing Then
    Return "True"
  Else
    Return "False"
End Function

I’m trying to launch the JavaScript function through a CustomValidator but I receive from Chrome’s Console the follow message:

Uncaught TypeError: Cannot read property 'Value' of undefined

The error appears right in the line

data: "{ 'email' : '" + args.Value + "' }",

so -always using Chrome-, I’ve set a breakpoint on that line and, from Console, I’ve write

args.Value

and I’ve obtained the correct value, i.e., the email address that I had entered. So… I’m a little lost.

I appreciate any help.

  • 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-16T02:42:08+00:00Added an answer on June 16, 2026 at 2:42 am

    Well, I finally made it work. I share here the used code. To get into context, in the user registration process, I want to check the email availability.

    In the head of Register.aspx:

    <script type="text/javascript">
      function check_email_availability(src, args) {
        var isValid;
        $.ajax({
          type: "POST",
          url: "Register.aspx/CheckEmailAvailability",
          timeout: 500,
          data: "{'email' : '" + args.Value + "'}",
          contentType: "application/json; charset=utf-8",
          async: false,
          success: function (result) {
                     isValid = result.d;
                   }
        });
        args.IsValid = isValid;
      }
    </script>
    

    In the body of Register.aspx:

    <asp:TextBox ID="tbEmail" runat="server" CssClass="TextBox" ClientIDMode="Static" TabIndex="1" />
    <asp:CustomValidator ID="CValidatorEmail" runat="server" ControlToValidate="tbEmail" ValidateEmptyText="false" ClientValidationFunction="check_email_availability" ErrorMessage="Email already in use" SetFocusOnError="True" />
    

    In the codebehind (Register.aspx.vb):

    <System.Web.Services.WebMethod()> _
    Public Shared Function CheckEmailAvailability(ByVal email As String) As Boolean
        Dim oMU As MembershipUser = Membership.GetUser(email)
        If oMU IsNot Nothing Then Return False Else Return True
    End Function
    

    I hope this will be useful to someone. There is a question almost identical using C# that have help me to make it work.

    Regards,

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

Sidebar

Related Questions

I know there's a lot of other questions out there that deal with this
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I am reading a book about Javascript and jQuery and using one of the
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I want to count how many characters a certain string has in PHP, but
For some reason, after submitting a string like this Jack’s Spindle from a text
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has

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.