changing template textbox value of DetailView Control through Code ?

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
 
L

Luqman

Solution to my problem is :

Dim myTotal as Int16

myTotal=16*32

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

Best Regards,

Luqman
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,054
Latest member
TrimKetoBoost

Latest Threads

Top