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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T19:21:05+00:00 2026-05-27T19:21:05+00:00

I am using jQuery AJAX and ASP.Net web methods. I need to check user

  • 0

I am using jQuery AJAX and ASP.Net web methods. I need to check user data entered in to HTML controls, I know that there are a lot of jQuery plugins but I used them one by one, but no luck, the issue is they use <form id="" action=""></form> tag while I do not. Also I do not submit my form as it is a jQuery AJAX application. I want some fields to have only floating points and some not null. Can anyone help?

Here is my code:

<table width="100%">
    <tr>
        <td><asp:Label ID="lblcontry" runat="server" Text="Select Country">   </asp:Label></td>
        <td>
            <select id="cmbCountry">
                <option value="0">Select Country</option>
            </select>
        </td>
    </tr>
    <tr>
        <td><asp:Label ID="lblCname" runat="server" Text="City Name"></asp:Label></td>
        <td><input type="text" id="txtCityName" /></td>
    </tr>
    <tr>
        <td><asp:Label ID="lblDialCode" runat="server" Text="Dial Code"></asp:Label></td>
        <td><input type="text" id="txtDialCode" /></td>
    </tr>
    <tr>
        <td><asp:Label ID="lblKeywords" runat="server" Text="KeyWords"></asp:Label></td>
        <td><textarea id="txtKeywords" cols="20" rows="2"></textarea></td>
    </tr>
    <tr>
        <td></td>
        <td>
            <input type="button" id="btnsave" value="Save" />
            <input type="button" id="btnCancel" value="Cancel" />
        </td>
    </tr>
</table>

$(document).ready(function () {
    $("#btnsave").click(function () {
        //here i want to check fields first and then save data.
        SaveData();
    });
}

I have imported all files and css.

  • 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-27T19:21:06+00:00Added an answer on May 27, 2026 at 7:21 pm
    $(document).ready(function () {
    
       $("#btnsave").click(function () {
    
          var isValid = false;      
          //manual validation examples, change to your needs
          if($('#'+ <%=txtCityName.ClientID %>).val() == '')
          {
              //tell the user
          }
          else
          {
              isValid = true; 
          }
    
          if(isNaN(parseFloat($('#'+ <%=txtDialCode.ClientID %>).val())))
          {
              //tell the user
          }
          else
          {
              isValid = true; 
          }         
    
    
          if (isValid) SaveData();
       });
    
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am building a AJAX intensive web application (using ASP.NET, JQuery, and WCF web
I am using ASP.NET page methods with jQuery. Here is my code, $.ajax({ type:
How to upload image using jQuery (AJAX) and ASMX web service - asp.net? I
I'm posting the following to an asp.net [Webmethod] using jquery via the $.ajax method.
I am using jQuery with ASP.NET in a project. Instead of using ASP.NET Ajax,
I'm using jQuery to make an Ajax call using an Http Post in ASP.NET
I am using asp.net mvc and jquery to make ajax requests and when the
i´m doing an ajax request using jQuery and asp.net on this way: $.ajaxSetup({ type:
I'm using jquery ajax to send values to my .net web service which in
I'm fetching JSON from my ASP .NET website using the following jQuery: $.ajax({ type:

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.