473,405 Members | 2,160 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,405 software developers and data experts.

Set Values on child controls on a formview

PW
I wish to get and set values on child controls on a formview.

For example. Changing the text in textbox. Hiding or unhiding child
controls based on user. Replacing a blank with a default or calculated value
that will need to be generated at runtime.

It seems as though this should be thoroughly documented, but I'm not finding
much.
Sep 18 '06 #1
2 2061
I suggest that you used template items in your FormView, then rename the
controls in your FormView.
In your Code behind, use FindControl Method of your FromView to get your
specific controls that you have renamed, and then do your work.

--
Muhammad Mosa
Software Engineer & Solution Developer
MCT/MCSD.NET
MCTS: .Net 2.0 Web Applications
MCTS: .Net 2.0 Windows Applications
"PW" wrote:
>
I wish to get and set values on child controls on a formview.

For example. Changing the text in textbox. Hiding or unhiding child
controls based on user. Replacing a blank with a default or calculated value
that will need to be generated at runtime.

It seems as though this should be thoroughly documented, but I'm not finding
much.
Sep 18 '06 #2
PW
Thanks Muhammad,

I'm already doing that and finding that it's not adequate.

For example using findcontrol doesn't seem to work with the .visible setting.

I can't seem to find any good info on how to change a textbox for example.

"Muhammad Mosa" wrote:
I suggest that you used template items in your FormView, then rename the
controls in your FormView.
In your Code behind, use FindControl Method of your FromView to get your
specific controls that you have renamed, and then do your work.

--
Muhammad Mosa
Software Engineer & Solution Developer
MCT/MCSD.NET
MCTS: .Net 2.0 Web Applications
MCTS: .Net 2.0 Windows Applications
"PW" wrote:
I wish to get and set values on child controls on a formview.
>
For example. Changing the text in textbox. Hiding or unhiding child
controls based on user. Replacing a blank with a default or calculated value
that will need to be generated at runtime.
>
It seems as though this should be thoroughly documented, but I'm not finding
much.
>
Sep 18 '06 #3

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

Similar topics

3
by: Michael Glass | last post by:
I'm working on an ASP.Net web app using VS2005 and the .Net 2.0 framework, and I have a serious problem with the page I'm currently working on. The page has, among other things, two FormViews and a...
0
by: Neil | last post by:
I want to be able to set the enabled status of certain controls on the edititem template of a formview control based on whether a check box is checked or not (or the value coming from the database...
9
by: Dick | last post by:
How do I set the focus to a control that is a child to a FormView? I've tried the obvious (below) and lots of variations but none seam to work! Sub Page_Load(ByVal sender As Object, ByVal e As...
0
by: Hawk | last post by:
Hello, this is my first post hope to get some good answers. I am using asp.net 2.0 and I am trying to pass the value entered in the formview textbox in insert mode "in this case it is the...
2
by: PW | last post by:
I wish to get and set values on child controls on a formview. For example. Changing the text in textbox. Hiding or unhiding child controls based on user. Replacing a blank with a default or...
1
by: Dan Sikorsky | last post by:
How can you tell which FormView controls have different values from their initial values when the page was loaded? If the user clicked the submit button on the EditItemTemplate and no controls...
1
by: Andrew Hayes | last post by:
I have a parent page with a gridview, and a child page with a formview. Using the solution on velocityreviews: ...
2
by: Matt MacDonald | last post by:
Hi all, I'm having an issue that's driving me crazy. I have a datatable that I need to display all the information for on a page. So, instead of manually coding every single column to a label, I...
4
by: pankajsingh5k | last post by:
Hi guys, These question is for all the experts... Please help me before my brain explodes The problem is again with the formview control.. I have a formview and i have to use it that...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.