T
TS
I have a custom textbox that i need to access a label's text property. the
label and textbox are 2 separate controls that will be on my page. Inside my
custom control i want to have access to this label's text. I was thinking of
having a property on my textbox that was something like LabelControlID. the
textbox could then do a .Findcontrol on its parent control to find this
label and access its text. i thought that this might be an expensive
operation using Findcontrol (has to do some kind of search algorithm to find
the control) and i don't want to burden the processor, especially if theres
200 textboxes on a page.
Don't know if it fits in here, but I saw the IDReferencePropertyAttribute
and wondered if it was applicable.
Also, I was wondering if i could make this attribute required like the
following?
[IsRequired=true]
public bool LabelControlID{
get { return _LabelControlID; }
set { _LabelControlID= value; }
}
thanks
label and textbox are 2 separate controls that will be on my page. Inside my
custom control i want to have access to this label's text. I was thinking of
having a property on my textbox that was something like LabelControlID. the
textbox could then do a .Findcontrol on its parent control to find this
label and access its text. i thought that this might be an expensive
operation using Findcontrol (has to do some kind of search algorithm to find
the control) and i don't want to burden the processor, especially if theres
200 textboxes on a page.
Don't know if it fits in here, but I saw the IDReferencePropertyAttribute
and wondered if it was applicable.
Also, I was wondering if i could make this attribute required like the
following?
[IsRequired=true]
public bool LabelControlID{
get { return _LabelControlID; }
set { _LabelControlID= value; }
}
thanks