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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T20:48:36+00:00 2026-06-02T20:48:36+00:00

Is it possible to implement the jQuery validation without using any plugins for this..

  • 0

Is it possible to implement the jQuery validation without using any plugins for this..

In my asp.net application, am using asp:textboxes to receive the inputs but the button is not an asp control, am calling the jQuery file at the button click event…I need to validate the inputs without using any plugins…..how can I achieve this….

I tried like put the requiredfield validator after textbox like,

<asp:TextBox ID="txtName" runat="server" ClientIDMode="Static"></asp:TextBox>
<div>
   <asp:RequiredFieldValidator ID="reqValName" ControlToValidate="txtName" 
        runat="server" CssClass="validation" ErrorMessage="*Required">
   </asp:RequiredFieldValidator>
</div>

and in my js file am checking the validation like,

$(function () {
$("#txtName").change(function () {
    if ($("#txtName").val() == "") {
        $(".reqValName").val();
    }
});

its working when I try deleting the value in the textbox(making it as empty), if I leave from here it shows the “*Required” error….fine….I tried with blur function, its not working and also, I need to stop the button click event before clearing this validation errors, in server side if it is asp button, I never worried bout this, but here it is html, I dunno how to do, and also how can I use regular expression for this textbox…..

  • 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-02T20:48:37+00:00Added an answer on June 2, 2026 at 8:48 pm

    if you do want server side validation, you can always turn the html button to server side control by adding runat=”server” and then you can provide a button click event to validate data on server side. See below for sample:

    in html:

    <input runat="server" type="submit" value="Submit" 
           id="btnSubmit" onserverclick="btnSubmit_Click" />
    

    in code behind:

    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if(txtName.Text == "Ray")
        {
            reqValName.IsValid = false; // Ray is taken
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is it possible to implement Remember Me using jquery? If so, any suggestion how
I need to load images after page load completed in ASP.Net without using JQuery.
I am developing an asp.net application in which I want to implement the discussion
i'm using the validation plugin from http://docs.jquery.com/Plugins/Validation i'd like to know if it is
I need to implement a dialog for a web application (ASP.NET/C#) where users can
Is it possible to implement long press in JavaScript (or jQuery)? How? (source: androinica.com
I'm trying to implement something like a photo carousel in jQuery. This carousel could
We've been working with ASP.Net MVC2 based web app. We're using DataAnnotations for model
Possible Duplicate: JavaScript: client-side vs. server-side validation There are a lot of JavaScript/jQuery client-side
I want to implement paging in Repeater via JQuery. Is it possible? If yes,

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.