changing template textbox value of DetailView Control through Code ?

  • Thread starter Thread starter Luqman
  • Start date Start date
L

Luqman

The detailview control is combination of textboxes and labels, while
detailview is in edit mode, how can I change the textbox value through code
?

For example:

My detailView has following fields.

Code : Label1
Name : Textbox1
Amount: Textbox2

I click the Edit Link Button of DetailView, now I want to put some
calculation and want to display in the Textbox2. But as textbox2 is a part
of dataview Template, so it cannot be accessed via form directly, how can I
?

Best Regards,

Luiqman
 
Solution to my problem is :

Dim myTotal as Int16

myTotal=16*32

CType(DetailsView1.FindControl("txtAmount"), TextBox).Text=myTotal

Best Regards,

Luqman
 
Back
Top