if i wanted to expose a property on a usercontrol that basically would
work like the way the validators work with the ControlToValida te
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. 1 1204
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 ControlToValida te
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.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 main form a number of them are displayed. During the On_Load
event, 1) It'll check to see if the usercontrol is disabled. If true, the
row containing the usercontrol is hidden.
|
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 happens.
dim filt as string
... build filter string...
UserControl.ReportFilter = filt
|
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 all is well. However, at some
point I get the "Object Refererence not
set to an instance..." error when I rebuild. If I try to drop the control
on another form I get the same error. I do not believe it is the code in the
usercontrol, as it...
|
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 binding like
normal.
The problem I am running into is that my UserControl ends up with a
different BindingContext then the ParentForm it is contained in and
thus all other controls on the parent form. (I want various controls
on the form to...
|
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 my question.
Once the UserControl is dropped onto the container page, how can I perform
some action on the codebehind of the container page from the codebehind of
the UserControl? For instance, suppose that the UserControl is dropped
inside one...
| |
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 links
like a menu)
A form P inherits this base class. I set the property me.ShowLinks =
true on the load event of P.
P contains another usercontrol (C) which has a button on it.
When I first call P, everything renders fine. First it goes on...
|
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 have
not set any value to the size of the dropped control in my form, recompiling
the project does not affect the new size of the user control in my form.
Surprisingly if I reset the Size property of my user control in the form,
the size changes...
|
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 string _SmurfText;
|
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" %>
In another custom web user control, I use this web control:
<%@ Register Src="~/Controls/EditUserBox.ascx" TagName="Eub" TagPrefix="mb"
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |