//HTML
<asp:GridView ID="GridView1"
runat="server" > </asp:GridView>
//C#
foreach (Control clt in GridView1.Rows[0].Controls)
{
foreach
(Control clt1 in
clt.Controls)
{
if (clt1 is TextBox)
{
((TextBox)clt1).BackColor = validateColor;
}
else if (clt1 is DropDownList)
{
((DropDownList)clt1).BackColor = validateColor;
}
}
}
No comments:
Post a Comment