hi frnds. . I m making a signup webpage. . Bt i m not able to use the validation with the querey. .when i click on signup button page executes without the validation. . .can anybody tel me how cn i make the signup page with al the validation needed in vs 2008 and sql 2000 in asp.net
There is a video about this in www dot asp dot net/general/videos (hmm can post links yet?) . But my first guess to solve the problem would be to put both controls in the same validation groupd
jquery is simple javascript funtion that you straight away add to your page.. first add jquery plugin (jquery.min.js) file and then add jquery.validate.js file. for more details browse jquery.com
see example <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script> <script src="http://ajax.microsoft.com/ajax/jquery.validate/1.7/jquery.validate.min.js " type="text/javascript"></script> <script type="text/javascript" language="javascript"> jQuery(document).ready(function() { jQuery('#your-form-id').validate(); }); </script> paste the above in your head section.
Whether you do javascript validation or not, the fields still need to be validated on the server. I normally just code the validation without using .Net's validation controls. I'm not good with regular expressions so this is a much easier option. But if you are set on using the built-in validation post the code that you have.
Most simple option for you is using the validation controls in .net itself. These very simple to use and this will also accurate.
There are two types of options u can use. One is .NET validation controls. simply drag n drop and also u can customize there behavior. Second option is use javascript. jst google ot n u cn find lot of tutorials
Try to use required field validator from .net validation control. It would be much more easier than jquery because the browser can always block a java scripts.
Hi friend, For ASP.Net,Jquery,Jawascript and Ajax related problems, You all can refer my Tech Blog. Programming Dept. Innovative Infosolutions
Have you have set the ControlToValidate parameter? I'm sure you must have otherwise it would probably throw an error. e.g: <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="* Enter name" [B]ControlToValidate="MyTextBox1"[/B] > Code (markup):
Here is the code snippet <asp:TextBox ID="textBoxTitle" runat="server" /><asp:RequiredFieldValidator ID="requiredFieldReason" runat="server" ErrorMessage="Required" ForeColor="Red" Display="Dynamic" ControlToValidate="textBoxTitle" />
its easy dude.... first of all check ur system.data.sqlclient this is the command comes under the page of asp.cs... make sure that this must not be miss... u can use the validation control and some ajex tool kit also