Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

asp.net web form, and jquery validation

Posted on 2013-11-22
6
Medium Priority
?
391 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 2000 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
 
LVL 82

Expert Comment

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

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

I found this questions asking how to do this in many different forums, so I will describe here how to implement a solution using PHP and AJAX. The logical flow for the problem should be: Write an event handler for the first drop down box to get …
Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. 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.: (CODE)
Suggested Courses

610 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