Solved

asp.net web form, and jquery validation

Posted on 2013-11-22
6
373 Views
Last Modified: 2013-12-27
With below code. how to add jquery validation code?
just simple if textbox is empty then show message <label>Required</label> next to the textbox.
 
 <form id="masterForm" runat="server">

 <input class="span3" runat="server" id="email" name="email" placeholder="Email" type="text" />                                                  
                                                   <input class="span3" runat="server" placeholder="Password" id="password" name="password" type="password" />


 

</form>    


 <script src="http://ajax.microsoft.com/ajax/jquery/jquery-1.4.2.js" type="text/javascript"></script>
       
 <script src="http://ajax.microsoft.com/ajax/jquery.validate/1.7/jquery.validate.js" type="text/javascript"></script>
0
Comment
Question by:solution1368
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
6 Comments
 
LVL 82

Expert Comment

by:leakim971
ID: 39670808
you mean you don't want the defaut and small tooltip box?
0
 
LVL 82

Accepted Solution

by:
leakim971 earned 500 total points
ID: 39670816
Test page : http://jsfiddle.net/6uDPn/

    $("#masterForm").validate({
           rules :{
               email: { required: true, email: true  },
               password: { required:true }
           }
    });

Open in new window

0
 

Author Comment

by:solution1368
ID: 39670916
0
 
LVL 82

Expert Comment

by:leakim971
ID: 39671229
what about closing this question ?
0

Featured Post

Major Incident Management Communications

Major incidents and IT service outages cost companies millions. Often the solution to minimizing damage is automated communication. Find out more in our Major Incident Management Communications infographic.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

In this article you'll learn how to use Ajax calls within your CodeIgniter application. To explain this, I'll illustrate how to implement a simple contact form to allow visitors to send you an email through your web site.
How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question