AspdotnetCodes.com
Search
Articles
Books
Resources
Asp.Net News
Downloads
Free Tech Magazines
Asp.Net Web Hosting
Archives
Softwares
Newsletter
Suggest Us
Link to Us
Feeds Subscription
Articles
Questions & Answers
Tips & Tricks
 Integrating Asp.Net Validation Controls with GridView at run-time
Posted by Moderator1 on 12/21/2007 9:40:53 AM Category: Asp.Net 2.0
Total Views : 130703
Add to my favorites
Email to friend
  
Introduction
This article explains the concept of integrating Asp.Net Validation Controls with the GridView control dynamically(at run-time).

A GridView control is used to display records in the tabular fashion which also provides the functionality to add new records, edit, update and delete the database records. While editing the records in the GridView control, we have to validate the data input by the user before it is saved into the database. The scope of this article is not to explain the functionalities of GridView control or define every validation controls in detail. Rather, we try to explain an easy way to integrate the Asp.Net Validation controls with the GridView control dynamically that is at run-time. Asp.Net got very rich validation controls which is listed below

1. RequiredFieldValidator
2. RangeValidator
3. RegularExpressionValidator
4. CompareValidator
5. CustomValidator

All the above validation controls can be created dynamically at run-time and integrate with any Input controls.
Getting into the Topic

Drag and drop a GridView control into your webpage and set its AutoGenerateColumns property as false. We are going to bind the GridView with the Customer Table from the database. The columns in the customer table are Customer Code [Cus_Code], Customer Name [Cus_Name], Gender [Cus_Sex], Age [Cus_Age], City [Cus_City] and Email Address [Cus_Email]. Specify the DataKeyNames as Cus_Code. Add 5 BoundField columns into the GridView and set its Data Field with the above column names. Add one CommandField column, make its command type as Edit/Update. Now convert all the BoundField fields in the GridView to TemplateField. So the every TemplateField will have a ItemTemplate section and EditItemTemplate section. ItemTemplate section will have a Asp.Net Label control binded to its corresponding column name. And EditItemTemplate section will have a TextBox control which is also binded to its corresponding column name.

For Customer Name column, we are going to put a static RequiredFieldValidator control at design time itself. So add a RequiredFieldValidator control into that column’s EditItemTemplate section. Specity its ControlToValidate property as TextBox1 and Error Message as “Name Required.”. For other columns such as Gender, we are going to use CustomValidator, for Age column we use RangeValidator, for Email we use RegularExpressionValidator and for City we use dynamic RequiredFieldValidator. Now the Html code of the GridView will look as follows

<asp:GridView ID="GridView1" runat="server" OnRowDataBound="GridView1_RowDataBound" AutoGenerateColumns="False" DataKeyNames="Cus_Code" OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowEditing="GridView1_RowEditing" OnRowUpdating="GridView1_RowUpdating">
<Columns>

<asp:TemplateField HeaderText="Name" SortExpression="Cus_Name">
<EditItemTemplate>
<asp:TextBox ID="TextBox1" runat="server" Text='<%# Bind("Cus_Name") %>'></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1" ErrorMessage="Name Required"></asp:RequiredFieldValidator>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label1" runat="server" Text='<%# Bind("Cus_Name") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>

<asp:TemplateField HeaderText="Gender">
<EditItemTemplate>
<asp:TextBox ID="TextBox2" runat="server" Text='<%# Bind("Cus_Sex") %>' MaxLength="3" Width="50px"></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label5" runat="server" Text='<%# Bind("Cus_Sex") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>

<asp:TemplateField HeaderText="Age" SortExpression="Cus_Age">
<EditItemTemplate>
<asp:TextBox ID="TextBox3" runat="server" Text='<%# Bind("Cus_Age") %>' MaxLength="3" Width="50px"></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label3" runat="server" Text='<%# Bind("Cus_Age") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>

<asp:TemplateField HeaderText="Email" SortExpression="Cus_Email">
<EditItemTemplate>
<asp:TextBox ID="TextBox4" runat="server" Text='<%# Bind("Cus_Email") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label4" runat="server" Text='<%# Bind("Cus_Email") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>

<asp:TemplateField HeaderText="City" SortExpression="Cus_City">
<EditItemTemplate>
<asp:TextBox ID="TextBox5" runat="server" Text='<%# Bind("Cus_City") %>'></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="Label2" runat="server" Text='<%# Bind("Cus_City") %>'></asp:Label>
</ItemTemplate>
</asp:TemplateField>

<asp:CommandField ShowEditButton="True" />

</Columns>
</asp:GridView>


Initialize the GridView control


Write a private method to fetch data from database as follows
private void BindGridView()

  string sql = "Select * from CustomerTest Order By Cus_Name"; 
  SqlDataAdapter da = new SqlDataAdapter(sql, “Yourconnectionstring”); 
  DataTable dt = new DataTable(); 
  da.Fill(dt);

  GridView1.DataSource = dt; 
  GridView1.DataBind();
Call this method in the page load event of your webpage as follows

protected void Page_Load(object sender, EventArgs e)
{
  if (!IsPostBack)
  {
    BindGridView();
  }
}

Press F5, you can see the GridView loaded with data from your Customer table.
Enable GridView Edit and Cancel Events

In the RowEditing event of the GridView control, put the following code.
protected void GridView1_RowEditing(object sender, GridViewEditEventArgs e)
{
  GridView1.EditIndex = e.NewEditIndex;
  BindGridView();
}
To do cancel event, paste the following code in the RowCancelingEdit event.


protected void GridView1_RowCancelingEdit(object sender, GridViewCancelEditEventArgs e)
{
  GridView1.EditIndex = -1;
  BindGridView();
}
 
Hit F5 again, your GridView will be loaded with data from your Customer table, and if you click the Edit linkbutton in any row, the corresponding row will change to Edit mode. You can also cancel the Edit operation by clicking the Cancel linkbutton.

Towards the Goal

Now we are going to create validation control dynamically in the RowDataBound event of the GridView control. First we are going to create a CustomValidator control for the Gender column. CustomValidator is used to validate any user input in a customized way either by a client-side validation script or a server-side validation script. Here we go for the CustomValidator with client-side JavaScript validation. The condition is the TextBox for the Gender column should accept value of single character either M or F for Male and Female respectively. The server side code to create a CustomValidator will be as follows
CustomValidator customValidator = new CustomValidator();
customValidator.ID = "CustomValidator1";
customValidator.ControlToValidate = "TextBox2";
customValidator.ErrorMessage = "Invalid Gender";
customValidator.SetFocusOnError = true;
customValidator.ValidateEmptyText = true;
customValidator.ClientValidationFunction = "fnClientFunction";
e.Row.Cells[1].Controls.Add(customValidator);
From the above code, we create an instance of CustomValidator class, we mention an ID for it, and we specify the ControlToValidate to TextBox2, we specify the ErrorMessage and set the SetFocusOnError and ValidateEmptyText property to true. Then we specify a JavaScript function name in the ClientValidationFunction property. The JavaScript function will be as follows


<script>
function fnClientFunction(source, arguments)
{
  if (arguments.Value=="M" || arguments.Value=="F") 
    arguments.IsValid=true; 
  else 
    arguments.IsValid=false;
}
</script>

The last line of the CustomValidator creation code is very important which binds, incorporate or integrate the validation control at exact Row and Column of the GridView control.

e.Row.Cells[1].Controls.Add(customValidator);

All validation controls after creation has to be bind with the GridView control in the above manner. Now let we go in fast track to create other validation controls and bind it with the GridView.

RangeValidator for Age Field

RangeValidator validates the input to fall between the specified range of MinimumValue and MaximumValue property. We can also mention the validation data type through the Type property of the RangeValidator. The code for creating and binding a RangeValidator with GridView control is as follows
RangeValidator rangevalidator = new RangeValidator();
rangevalidator.ID = "RangeValidator1";
rangevalidator.ControlToValidate = "TextBox3";
rangevalidator.ErrorMessage = "Invalid Age";
rangevalidator.MaximumValue = "100";
rangevalidator.MinimumValue = "0";
rangevalidator.SetFocusOnError = true;
rangevalidator.Type = ValidationDataType.Integer;
e.Row.Cells[2].Controls.Add(rangevalidator);
RegularExpressionValidator for Email Column

RegularExpressionValidator, as the name suggests you can define your own Regular Expressions and assign it to the ValidationExpression property. Here we use a Regular Expression for the Email Addresses.


RegularExpressionValidator regexpvalidator = new RegularExpressionValidator();
regexpvalidator.ID = "RegularExpressionValidator1";
regexpvalidator.ValidationExpression = "\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*";
regexpvalidator.ControlToValidate = "TextBox4";
regexpvalidator.ErrorMessage = "Invalid Email Id";
regexpvalidator.SetFocusOnError = true;
e.Row.Cells[3].Controls.Add(regexpvalidator);

RequiredFieldValidator for City column

RequiredFieldValidator used to mention the mandatory field or compulsory field. It won’t allow you to leave the field empty. Below is the code to create RequiredFieldValidator dynamically.

RequiredFieldValidator reqfldVal = new RequiredFieldValidator();
reqfldVal.ID = "RequiredValidator10";
reqfldVal.ControlToValidate = "TextBox5";
reqfldVal.ErrorMessage = "City Required";
reqfldVal.SetFocusOnError = true;
e.Row.Cells[4].Controls.Add(reqfldVal);

Complete Source Code to be added inside RowDataBound event of GridView

The full source code of the RowDataBound event is given below.

protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{

if (e.Row.RowType == DataControlRowType.DataRow)
{

//Checking EditIndex should be same as current Row Index, then bind the validation controls in that particular row.

if (GridView1.EditIndex == e.Row.RowIndex)
{

CustomValidator customValidator = new CustomValidator();
customValidator.ID = "CustomValidator1";
customValidator.ClientValidationFunction = "fnClientFunction";
customValidator.ControlToValidate = "TextBox2";
customValidator.ErrorMessage = "Invalid Gender";
customValidator.SetFocusOnError = true;
customValidator.ValidateEmptyText = true;
e.Row.Cells[1].Controls.Add(customValidator);

RangeValidator rangevalidator = new RangeValidator();
rangevalidator.ID = "RangeValidator1";
rangevalidator.ControlToValidate = "TextBox3";
rangevalidator.ErrorMessage = "Invalid Age";
rangevalidator.MaximumValue = "100";
rangevalidator.MinimumValue = "0";
rangevalidator.SetFocusOnError = true;
rangevalidator.Type = ValidationDataType.Integer;
e.Row.Cells[2].Controls.Add(rangevalidator);

RegularExpressionValidator regexpvalidator = new RegularExpressionValidator();
regexpvalidator.ID = "RegularExpressionValidator1";
regexpvalidator.ValidationExpression = "\\w+([-+.']\\w+)*@\\w+([-.]\\w+)*\\.\\w+([-.]\\w+)*";
regexpvalidator.ControlToValidate = "TextBox4";
regexpvalidator.ErrorMessage = "Invalid Email Id";
regexpvalidator.SetFocusOnError = true;
e.Row.Cells[3].Controls.Add(regexpvalidator);

RequiredFieldValidator reqfldVal = new RequiredFieldValidator();
reqfldVal.ID = "RequiredValidator10";
reqfldVal.ControlToValidate = "TextBox5";
reqfldVal.ErrorMessage = "City Required";
reqfldVal.SetFocusOnError = true;
e.Row.Cells[4].Controls.Add(reqfldVal);

}
}


Updating new Data in GridView

As usual we can update the changed data into the database Customer table in a very custom way. So write you code in the RowUpdating event of the GridView control as follows
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)


TextBox TextBox1 = ((TextBox)GridView1.Rows[e.RowIndex].Cells[0].FindControl("TextBox1"));
TextBox TextBox2 = ((TextBox)GridView1.Rows[e.RowIndex].Cells[1].FindControl("TextBox2"));
TextBox TextBox3 = ((TextBox)GridView1.Rows[e.RowIndex].Cells[2].FindControl("TextBox3"));
TextBox TextBox4 = ((TextBox)GridView1.Rows[e.RowIndex].Cells[3].FindControl("TextBox4"));
TextBox TextBox5 = ((TextBox)GridView1.Rows[e.RowIndex].Cells[4].FindControl("TextBox5"));

string Age = "0";

if (TextBox3.Text.Trim() != String.Empty)
Age = TextBox3.Text;

string sql = "UPDATE Customers " + "SET Cus_Name='" + TextBox1.Text + "', Cus_Sex='" +
TextBox2.Text + "', Cus_Age='" + Age + "', Cus_City='" + TextBox5.Text + "', Cus_Email='" +
TextBox4.Text + "' " + "WHERE Cus_Code= " + GridView1.DataKeys[e.RowIndex].Value;

using (SqlConnection conn = new SqlConnection(“YourConnectionString”))
{
SqlCommand cmd = new SqlCommand(sql, conn);
conn.Open();
cmd.ExecuteNonQuery();
conn.Close();
}

GridView1.EditIndex = -1;
BindGridView(); 

}

That’s it. We are right on job. Save and run your application. Click on the Edit link, do all sorts of inputs you want, try to compromise the validation control. If so, adjust your code accordingly. This sample illustrates a simple and easy way to create validation control and bind it with GridView control dynamically at run-time. Hope we achieve our targets.

Click here to view our GridView sample with dynamic Validation controls
 
Viewer's Comments
Posted by Sonu on 1/3/2008 3:08:20 AM
Excellent code.!!! Thanx
 
Posted by liyakath on 1/18/2008 1:01:20 AM
This artilcle is very helpfull Thanks
 
Posted by Crazy on 2/5/2008 6:49:45 AM
Yes, its a very good article. Simple step by step illustration with code, but very good depth knowledge
 
Posted by Shikha on 2/13/2008 3:24:51 AM
Really 'Excellent' . GOD BLESS YOU
 
Posted by sandeep chotia on 2/13/2008 6:23:07 AM
excellent code . its a excellent article i found for me very helpful thanks
 
Posted by Anil on 3/6/2008 2:59:24 PM
superb....article..... cleared 85% or my doubts regarding gridview.
 
Posted by ravichandra on 3/12/2008 2:52:30 AM
Good work.
 
Posted by Akhil on 3/20/2008 1:12:45 AM
good work dude....keep up ur good work
 
Posted by noyelin on 3/23/2008 1:08:32 PM
how to add rows in in grid control during runtime
 
Posted by prakash on 4/2/2008 6:45:05 AM
Good work,
 
Posted by Rizwan on 4/4/2008 12:17:50 AM
Good work it helped me alot. Thanks!!!!
 
Posted by Sami on 4/7/2008 7:42:02 AM
Plz someone tell me that when i click a row in gridview ,so that all the data appears in the textboxes above.Assuming that i have equal no of textboxes as the number of coloums in gridview.
 
Posted by paresh on 4/12/2008 12:34:20 AM
The Article is very helpful. but validation in my case it was not working properly. IF after entering M or F properly in Gender textbox . when you click update link the data is not updated..
 
Posted by Gops on 4/16/2008 5:09:50 AM
It is really a awesome article...
 
Posted by srinivas on 4/18/2008 7:45:49 AM
After applying validation controls. alignment of controls in the gridview are not in proper. How to rectify this problem? Very urgent
 
Posted by srinivas on 4/18/2008 7:47:03 AM
After applying validation controls. alignment of controls in the gridview are not in proper. How to rectify this problem? Very urgent
 
Posted by Amey on 4/22/2008 2:34:56 AM
Very useful code !! this helps me a lot !!! Thank you very much to writer.
 
Posted by Rusty on 4/23/2008 2:40:06 PM
Is it possible to validate an item in the gridview row after clicking off of the itemtemplate on a gridviewrow?
 
Posted by sachin on 5/13/2008 6:59:37 AM
wow!!
 
Posted by friend on 5/15/2008 6:20:40 AM
good article ,thanks for it
 
Posted by friend on 5/15/2008 6:21:26 AM
thanks for ur article
 
Posted by nix on 5/19/2008 1:47:28 AM
Its helpful.Thanks.
 
Posted by venkatesh on 5/24/2008 11:08:09 PM
excellent Work
 
Posted by sankviju on 5/28/2008 6:29:59 AM
Hey, Excellent Article...Could you please tell me how can I implement the insert function feature as well...on the same grid... please send me a reply.. Thnx pepcoder@live.com
 
Posted by sv011975 on 6/3/2008 9:02:14 AM
great article!!!!! 10 for you!!!
 
Posted by Mohd Javed on 6/9/2008 12:09:10 AM
sir,your articles is very good.i am fully satisfied with your code and articles.
 
Posted by Aniruddha on 6/10/2008 7:07:05 AM
it's Very Very Good Artical Dude 200% marks to u. Thanks Very much
 
Posted by venkatesh on 6/11/2008 6:11:30 AM
hai, The code is excellent and Question:- i wanted to know how u r displaying the error mesages all to gether when there is an error in more then one text box in the alert box. Please respond,please reply me waiting for u r reply it is urgent.
 
Posted by venkatesh on 6/11/2008 7:29:02 AM
chinna4u.salla@gmail.com
 
Posted by Ambrish on 6/18/2008 11:19:20 AM
Master Piece, Excellent Code. Thanx a Ton.
 
Posted by M.Daud on 6/26/2008 8:06:06 PM
really Kool
 
Posted by Megha Jain on 7/4/2008 6:01:43 AM
THIS IS REALLY G8 AND EASLY EXMPLAE. THANX
 
Posted by sangeeta on 8/2/2008 12:58:54 AM
Excellent clear idea of gridview
 
Posted by baka on 8/7/2008 3:44:51 AM
You solved my customvalidator problem, thanks.
 
Posted by Freddy on 9/9/2008 8:10:44 AM
Very clear and thanks a lot
 
Posted by jj on 11/1/2008 5:41:47 AM
iam not like that
 
Posted by manoj tayde on 11/5/2008 1:36:30 AM
very good! Its realy helpfull for me.
 
Posted by Manis Sharma on 11/10/2008 10:54:09 PM
U r very smart u have shown all work of validations controls very nicely , but u have not shown the use of compare validator inside gridview why ? u have wasted my half hour
 
Posted by prashant gupta on 11/15/2008 4:23:43 AM
Excellent
 
Posted by data GridView on 12/3/2008 3:58:33 AM
hey we need not to do all this in rowdatabound event. we cab also do as follow.. <EditItemTemplate> <ItemStyle horizontalalign="left" width="10%" /> <anthem:TextBox ID="txtTax" MaxLength="20" runat="server" Text='<%# Eval("name") %>' CssClass="input"></anthem:TextBox> <anthem:RequiredFieldValidator runat="server" ValidationGroup="Update"
 
Posted by Same on 12/19/2008 2:23:33 PM
what is teh use of this article and why would you need a dynamic gridview atall i know find any reason article is good but waste of time
 
Posted by techy on 1/6/2009 1:54:42 AM
i am having one dropdownlist and i am adding the values from the dropdownlist into the listbox. how i can i validate the listbox without adding the same value from dropdownlist.
 
Posted by sanjiv Thakur on 1/19/2009 3:25:12 AM
the stuff provided through this page is very useful and important ..i took 2 much help frm it..to clear my probs in validation on run time... thanx for it...
 
Posted by Camille on 2/3/2009 1:45:36 PM
I would say that the functionnality is good and very useful. but it is a flat layer code. I wouldn't recommend using this way of coding.
 
Posted by Mehta Chandni K on 2/18/2009 6:53:19 AM
Excellent Code. Very usefull for students like us. But I want to know that why sorting() method is not called by the headertext though it has assigned the sortexpression?? Reply sooner for this question...
 
Posted by neelam on 3/9/2009 1:51:18 PM
great job! thanks
 
Posted by Sachin on 4/22/2009 5:37:45 AM
Hey really this is a very nice aricle. but i have not understodd how you are displaying alert messagebox.I have tried this code but it shows errormessage but i can't stop the postback even if the input is wrong in textbox. please respond soon.
 
Posted by syam on 5/15/2009 2:45:19 AM
can you please help me? q : How to do the validation for 2 row which cannot have a same value?
 
Posted by anas on 7/21/2009 8:00:05 AM
very good article thanks
 
Posted by chinmay on 8/5/2009 1:11:41 PM
Hey very good dude ,I think you have done a good job & whoever says this is waste of time for them I think you guys should appreciate him instead of commenting . At least he posted this which will benefit so many developers.
 
Posted by jatinchandarana on 8/6/2009 11:33:30 AM
this saved ne
 
Posted by jatinchandarana on 8/6/2009 12:59:56 PM
in this code u have call function BindGridView() in gridview edit and othe event,instead of this if u write GridView1.DataBain() then it is also work nice Code
 
Posted by jatinchandarana on 8/6/2009 1:00:44 PM
in this code u have call function BindGridView() in gridview edit and othe event,instead of this if u write GridView1.DataBain() then it is also work nice Code
 
Posted by dani on 8/10/2009 2:46:43 AM
I did as you said but every time it comes to the rowupdating the validation control is nowhere to be found. I put a breakpoint at the beginning of the event, set a watch to find the validation control in the exact same cell I put it but it comes out null. How come?
 
Posted by Mark on 12/4/2009 5:34:16 AM
Hello world! I am getting this error:- Unable to find control id 'TextBox1' referenced by the 'ControlToValidate' property of 'CustomValidator1'. protected void GridView2_RowDataBound(object sender, GridViewRowEventArgs e) { CustomValidator customValidator = new CustomValidator(); customValidator.ID = "CustomValidator1"; customValidator.ControlToValidate = "TextBox1"; <------------------------- ERROR customValidator.ErrorMessage = "Please enter some text&
 
Posted by kuldeep guliyan on 2/4/2010 11:53:20 PM
excellent code i want to know about how i can uneditable some gridview rows at run time
 
Posted by charan on 3/16/2010 3:58:29 AM
yes it helps very much. i thanks aspdotnetcodes.com team for giving good replies
 
Posted by naser on 6/30/2010 1:05:41 AM
thanks it was very helpful god bless you guy!
 
Posted by Twinkle on 8/17/2010 5:02:46 AM
Best Article Thanks Please Provide Compare Validator
 
Posted by vikash on 12/30/2010 10:59:01 PM
I want to bind Repeater Dynamicaly but I dont't get succuess. whalt I 'll do Please help me.
 
Posted by vikash on 12/30/2010 11:06:24 PM
Dynanamic bind Grid view ********************************************************************************************** BoundField boundfield = new BoundField(); boundfield.DataField = "data1"; boundfield.HeaderText = "data1."; boundfield.HeaderStyle.HorizontalAlign = HorizontalAlign.Center; boundfield.ItemStyle.HorizontalAlign = HorizontalAlign.Center; boundfield.ItemStyle.BorderStyle = BorderSty
 
Posted by Mark Pearson on 2/24/2011 8:14:39 AM
Say you want to call serverside validation on the custom validator
 
Posted by Haritha Kakarla on 3/29/2011 2:20:36 AM
Excellent description. It really helps a lot. Keep doing well.
 
Posted by jeyaganesh on 5/3/2011 1:19:43 AM
i want client side validation in gridview and how to affect the validation in textbox using gridview
 
Posted by jeyaganesh on 5/3/2011 1:24:57 AM
how to affect the validation in textbox within the gridview
 
Posted by Marc on 8/9/2011 7:48:47 AM
Could you PLEASE add paging to this example. A custom Gridview without paging is not very practical, and having paging would make this example SO Much more helpful. Thanks,
 
Posted by subramanyam on 11/1/2011 8:13:41 AM
Best article for custom validator. Please provide custom validator for atleast one of the cell value required for each and every row in gridview
 
Posted by Sayeed Ahmed on 12/9/2011 10:32:42 PM
We can also do it in the properties of validation controls of gridview. Is it require to carry out in codebehind
 
Posted by uma on 1/19/2012 12:32:47 PM
excellent job .thanks keep posting like this
 
Posted by sumana on 3/31/2012 3:09:30 AM
thank you...for the code.....but i need the validation for mobile number in gridview... Can you please help me for the code
 
Posted by Johan on 1/15/2013 5:47:29 AM
Do you have any code on how to call Server Side validation from the CustomValidator?
 
Posted by Ishaq on 4/30/2015 5:46:10 PM
Great Well Done
 
 Rating & Comments
A word 'Excellent' means lot to the author of this article. You can give comments about this article but not the author.
Rate this Article:
Name:
Email Id:  
We never display your email id anywhere.
Comment/Question: Max. 500 letters
Sixty plus Ten Equals To
 
Sponsored by
Many .NET teams are underperforming, is yours?
Take Advantage of Oracle's 2 Day DBA Course
Integrating Silverlight 4 with SharePoint 2010 - Free 42 Page Sample Chapter