473,396 Members | 1,712 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,396 software developers and data experts.

Getting handle on contol programatically

Hi,

I'm sure there's a really easy way of doing this, but I haven't found it
yet.

I have a bunch of asp:hyperlinks. I have their IDs stored in a
database. I want to be able to pull a record from the database and get
a handle on the control with that ID.

I thought FindControl might work something like this:

FindControl(IDvalueFromDatabase).CssClass = blah

But that doesn't work. How should I be using findControl? Or how about
another way of doing it?

Thanks
Nov 19 '05 #1
1 1029
That's how it works. I can only guess you aren't using FindControl on the
control that directly contains the hyperlinks (e.g. LinkPanel.FindControl).
FindControl only finds direct children of the current control (which would
be the page in that instance).

"Sosh123" <so**@so9sh.com> wrote in message
news:eE**************@TK2MSFTNGP12.phx.gbl...
Hi,

I'm sure there's a really easy way of doing this, but I haven't found it
yet.

I have a bunch of asp:hyperlinks. I have their IDs stored in a
database. I want to be able to pull a record from the database and get
a handle on the control with that ID.

I thought FindControl might work something like this:

FindControl(IDvalueFromDatabase).CssClass = blah

But that doesn't work. How should I be using findControl? Or how about
another way of doing it?

Thanks

Nov 19 '05 #2

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

Similar topics

17
by: John Hunter | last post by:
I have a largish data set (1000 observations x 100 floating point variables), and some of the of the data are missing. I want to try a variety of clustering, neural network, etc, algorithms on the...
15
by: Christian Tismer | last post by:
Dear friends. During a conversation with good friends and newly acquired Pythonista, we were discussing Python, what it is in essence, and what it is giving to us. The people were Dinu...
3
by: Daniel H. | last post by:
Hi! When I create a new form programatically, I can save its handle in a collection of some type Later, I need to find that form based on a handle I saved and call one of its functions. The newly...
4
by: Joo Park | last post by:
Hello, I'm trying to add a TextBox to a web page dynamically. However, the compiler is complaining that it needs to be place in a form. How do I get a reference to a form object so that i can...
0
by: bob | last post by:
I'm using the DataGridView control, with EditMode set to "edit programatically" and SelectionMode set to "FullRowSelect" (or something like that). My program allows the User to go into edit mode by...
0
by: mark16 | last post by:
Hey guys, Ive got a handle on a windows application using c#, now ive figured out how to get simple contol of it by using the SendKey.send(); function which sends basic keyboard...
2
by: jvdub22 | last post by:
I am currently using a VB 6 MS Data Grid Control bound to an SQL express data base. My grid has 20 visible rows when I load my form, when I scroll down and select a row higher than 20 the grid refers...
33
by: JamesB | last post by:
I am writing a service that monitors when a particular app is started. Works, but I need to get the user who is currently logged in, and of course Environment.UserName returns the service logon...
5
by: jediknight | last post by:
Is it possible to programmatically stop multiple browsers from getting the same session state? The problem I have is that whenever I open a new browse using File- I would like to stop this...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
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
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...

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.