473,387 Members | 1,528 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

changing template textbox value of DetailView Control through Code ?

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
Nov 16 '06 #1
1 3063
Solution to my problem is :

Dim myTotal as Int16

myTotal=16*32

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

Best Regards,

Luqman

"Luqman" <pe*******@cyber.net.pkwrote in message
news:ev**************@TK2MSFTNGP06.phx.gbl...
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


Nov 19 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: 42 | last post by:
I implemented a simple class inherited from Page to create a page template. It simply wraps some trivial html around the inherited page, and puts the inherited page into a form. The problem I...
3
by: vivela | last post by:
hi, I hope you could help me out on this one,cause I have been trying for 4 days to solve it,but couldn't quite get it right: I have an ASP textbox that should change the value in a dropdownlist....
2
by: Luqman | last post by:
Hi, Any Idea how to Display Todays Date in DetailView Template Field while Inserting ? For example: When I click on New Button of DetailView Control, I need to display Today's Date in a...
2
by: Luqman | last post by:
I have coded in Textbox_changed Event: If CType(txtVoucherNo.Text, Long) = 0 Then Me.DetailsView1.ChangeMode(DetailsViewMode.Insert) Me.DetailsView1.AutoGenerateInsertButton = True ...
4
by: John Kotuby | last post by:
Hi all, I have a simple user-form which accepts contact and profile information for the user to edit and save. All the textboxes are working fine and displaying the expected data, both when the...
1
by: zergziad | last post by:
Hi All, I really need help to solve my problem. My case is on looping through textbox in gridview. I had a gridview placed in my page. The gridview contains template field which I created it...
4
by: Craig Buchanan | last post by:
I dynamically add data-bound templates to a gridview in my ascx control. while this works correctly when the gridview is databound to the datatable, i'm having issues on postback. i would like...
8
by: mike_solomon | last post by:
I have a button <input type="submit" name="Delete" value="Delete"> This code can not be changed I want to use Javascript to change the type I tried:
3
by: Crazy Cat | last post by:
Hi all, I am developing an asp.net 2.0 application in Visual Studio 2005. On my page I have a simple datalist that is bound programmatically to a collection of simple objects. On this page I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.