In my application i have 50 textboxes i want find all the textbox control using the code and i want to perform a color change in the textbox after doing certain validations. How can i acheive that? i used the following code but it doesnt work properly
foreach (Control cntrl in Page.Controls)
    {
        if (cntrl is TextBox)
        {
            //Do the operation
        }
    }
<%@ Page Language="C#" MasterPageFile="~/HomePageMaster.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" Title="Sample Page" %>