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

setting a usercontrol property as another control

if i wanted to expose a property on a usercontrol that basically would
work like the way the validators work with the ControlToValidate
property, whats a reliable way of finding the correct control off of a
text property?

I was figuring i could expose a string, allow the consumer to set it,
and then use some technique in the usercontrol to get the reference to
the instance of the control, but i'm not having much luck with actually
finding the control from the parent page by a string that matches the
control ID of the target control.

it would be great if someone could help.. if i have to end up writing a
recursive FindControl method i will, but that makes me feel a little
sick inside.

Nov 15 '06 #1
1 1191
Wow, i must be tired, please disregard this question

kferron wrote:
if i wanted to expose a property on a usercontrol that basically would
work like the way the validators work with the ControlToValidate
property, whats a reliable way of finding the correct control off of a
text property?

I was figuring i could expose a string, allow the consumer to set it,
and then use some technique in the usercontrol to get the reference to
the instance of the control, but i'm not having much luck with actually
finding the control from the parent page by a string that matches the
control ID of the target control.

it would be great if someone could help.. if i have to end up writing a
recursive FindControl method i will, but that makes me feel a little
sick inside.
Nov 15 '06 #2

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

Similar topics

2
by: Lau Lei Cheong | last post by:
Hello, I'm writing a usercontrol that contains a property named "disabled". It is set to false by default but there is also another button in the usercontrol that'll set it to true. On the...
8
by: David Lozzi | last post by:
Howdy, I have a user control that is a report to display data. On the page the control is inserted in, I have filter options to filter the report. When I try to do something like this, nothing...
2
by: Shallotx | last post by:
I am building a simple user control - a listview, a couple buttons. I build the solution, drop the control on a form, and all is well. I then go back, modify the Usercontrol, rebuild, and still...
6
by: MeowCow | last post by:
I have created a UserControl that encapsulates a third party data grid. My goal was to create my own DataSource and DataMember properties that forward the binding to the third party grid, then use...
10
by: Benton | last post by:
Hi there, I have a UserControl with a couple of textboxes and a couple of buttons ("Save" and "Cancel"). The Click event for this buttons is in the UserControl's codebehind of course, so here's...
1
by: xke | last post by:
I have a base class which overrides CreateChildControls / Render. Inside CreateChildControls, based on a public property ShowLinks in this class, I can include/display a usercontrol (kind of set of...
4
by: Hamed | last post by:
Hello I have a UserControl sized to 100; 200 When I drop it in my form the initial size is 100;200 (as I prefer). Then I decided to change the size of my UserControl to 200;200 but although I...
0
by: joer.banno | last post by:
Hi I have a table with 2 columns, one column is a Catalogpartzone and another a webpartzone: I have a UserControl which only contains a label, this label has a public property. private...
4
by: Jeff | last post by:
hi asp.net 2.0 I have created a custom web control, here is it's header: <%@ Control Language="C#" AutoEventWireup="true" CodeFile="EditUserBox.ascx.cs" Inherits="Controls_EditUserBox" %> ...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.