Sunday, September 7, 2008

Get the control out from the templatefield of Detailsview

The following codes are the examples to get the control out from the templatefield of Detailsview:

TextBox UserNameBox = DetailsView1.FindControl("UserName") as TextBox;

Label ErrorLabel = DetailsView1.FindControl("ErrorLabel") as Label;

0 Comments: