programming we consider all important topic for knowledge about controls,web Services, JSON, Ajax, database, and interview related Question. In this and sql server tutorial blog we give many examples of jquery as like How Play YouTube Video in Your Website by URL, How to Play YouTube Videos in by using Jquery , Jquery Change div background on mouseover in , JQuery UI Datepicker (Calendar) etc.

Sunday, July 20, 2014

Use of Required Field validator

Use of Required Field validator in

In Asp .Net RequiredFieldValidator use to use to fill some value in given Textbox Means you can not left it Empty.In .Net Programming of web development it is impotent at some time that we have some retraction by which user(which use this web page) can not left blank this particular Textbox.
For RequiredFieldValidator Example in website at the login web page we all wage
Enter the Username and password,the developer do not want to processing  data in back site
or by Query by bank data. Because we know that if you are registers user the you must have 
your own username and password on this site.Continuous validation of load test suites.
So in the web programming we want RequiredFieldValidator for this Regression we give code also. simple you create your page and copy this code and past on your page. web page code here:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default2.aspx.cs" Inherits="Default2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
<html xmlns="">
<head runat="server">
    <title>Required Field validator</title>
    <form id="form1" runat="server">
<asp:TextBox ID="TxtPassword" runat="server" ToolTip="Enter Password" ValidationGroup="v"></asp:TextBox>                               <asp:RequiredFieldValidator runat="server" id="reqName" controltovalidate="TxtPassword" errormessage="Enter Passwors !" ValidationGroup="v"/>  
    <asp:Button ID="Button1" runat="server" Text="Button" onclick="Button1_Click"  ValidationGroup="v"/>
Hear we take a web page with name "Default2.aspx" and make code in web programming for the required file validator. we take a Textbox with name "TxtPassword".And take a Required field validatore then Associate this validatore with TxtPassword TExtbox.if the uesr left this textbox Empaty the give "Enter Password !" Error Message. 

Related Post :

Old Post :