.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Articles >> ASP.NET >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Validation In ASP.Net

Posted By:Narayanan       Posted Date: October 13, 2011    Points: 200    Category: ASP.NET    URL: http://www.dotnetspark.com  

Here, we discussed about some validation of controls in ASP.NET.
 

ASP.Net:
It is a technology for building Powerful and Dynamic application.
It is a Part of  .Net Framework.
Basic HTML and CSS Knowledge is preferable.
   .NET language is a Independent which means you can use any .Net supported language to make a .Net applications.

What is mean by VWD?
   Visual Web Developer

Validation in ASP.Net
     Now a days, Validation is a important in the Window application and Web Application.In web application ,validation is a separate control.
Types of Validation:
      1)RequiredFieldVaildator

                   It is a very useful and very easy.You can use it in the Textbox validation .
Coding Part
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>



 <%--This is aTitle Part--%> 
    Testing Required Validator  


    
    
<%--This is a Controls declartation--%>


Note:
  Use Comment a line : Select a line and Press Ctrl+k,Ctrl+c
  Use Uncomment a line : Select a line and Press Ctrl+u,Ctrl+c  
 2) Comparevalidator:
             -- It is useful for somecase.It is very useful to compare a two values  of two controls
Coding Part:
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>



 <%--This is aTitle Part--%>
Testing Required Validator  


    
<%--This is a Controls declartation--%> First Value:

Secound Value:


 Operator: Lessthan,LessthanEqual,Greater,Greaterthan,Equal,NotEqual,DataTypeCheck.
 type: currency,Date,Integer,Double,String
  
 try to change the Operator and type based on your scenario

3)RangeValidator:
              It is very useful for Date range Specification that user enter within minimumvalue and maximum value.
<%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>



 <%--This is aTitle Part--%>
    Testing Required Validator  


    
<%--This is a Controls declartation--%> First Value:

 Subscribe to Articles

     

Further Readings:

Responses

No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend