Hi there,
No, you can't access these controls directly. The DetailsView is a container control that contains these individual controls. Since you can potentially have more than one DetailsView on a page, the DetailsView must ensure that each TextBox and other controls have a unique name.
Depending on when and where you use this code, you can try this:
TextBox myTextBox = (TextBox) DetailsView1.FindControl("TextBox1")
myTextBox.Text = "Hallo";
This code "finds" the TextBox inside the DetailsView and then sets its text.
Hope this helps,
Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of
ASP.NET 2.0 Instant Results and
Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.