Ask a Question related to ASP.NET Building Controls, Design and Development.
-
Andrew Backer #1
Combining Two Controls, best way?
I have a working date picker, and I want to combine it at the control
level with a textbox and validator, so we can use
<my:datepickertextboxthingy/>
What is the best way to go about this? I am most concerned with access
to the textbox's properties, since this will function mostly as a
textbox with a mostly-inert object attached to it.
Right now I have subclassed TextBox, and am attempting to somehow
attach the other control to it so they both get rendered. In the end I
think I would like to be able to wrap them in more html (tables, span,
div, etc), so I think I will need a little more control. In the end I
need to be here :
<my:textbox CssClass="Fun" Columns="10" ..more textbox props.../>
Where should I instantiate the addtional controls? How should I handle
prerender (the date picker needs it)? What should I do in Render() to
make this happen...
I guess I am really trying to avoid writing properties that wrap *all*
of the textbox properties. Any good way to do this?
TIA,
- Andrew Backer
Andrew Backer Guest
-
Control.Controls bug? Control's child controls missing at the run time.
Hello, ..NET 1.1/VB.NET: I have a custom web control Public Class DatePicker Inherits Control Implements INamingContainer -
Why the properties of web user controls which inherted from my custom base UI controls MISSED?
Why the properties of web user controls which inherted from my custom base UI controls MISSED? How should I to set enable? -
Combining scripts
Is there any rule on how to combine scripts targetting the same MovieClip? I have the following scipts: Alpha tweening: text4_mc._alpha = 0;... -
user controls: dynamiclly added child controls dont survive post back ?
hi, i have some strange behaviour: i've created a web user control that add's some child controls (e.g: textbox, image buttons) to its control... -
Combining Fields
Look up 'ISNULL' and COALESCE' in BOL. "Greg" <gmanship@wvmls.com> a écrit dans le message de news: us3E67MQDHA.3192@tk2msftngp13.phx.gbl... -
Steve C. Orr [MVP, MCSD] #2
Re: Combining Two Controls, best way?
I suggest you create a composite control.
Here are the details:
[url]http://SteveOrr.net/articles/ComboBox.aspx[/url]
--
I hope this helps,
Steve C. Orr, MCSD, MVP
[url]http://SteveOrr.net[/url]
"Andrew Backer" <awbacker@gmail.com> wrote in message
news:1121300837.840407.160400@z14g2000cwz.googlegr oups.com...>I have a working date picker, and I want to combine it at the control
> level with a textbox and validator, so we can use
> <my:datepickertextboxthingy/>
>
> What is the best way to go about this? I am most concerned with access
> to the textbox's properties, since this will function mostly as a
> textbox with a mostly-inert object attached to it.
>
> Right now I have subclassed TextBox, and am attempting to somehow
> attach the other control to it so they both get rendered. In the end I
> think I would like to be able to wrap them in more html (tables, span,
> div, etc), so I think I will need a little more control. In the end I
> need to be here :
>
> <my:textbox CssClass="Fun" Columns="10" ..more textbox props.../>
>
> Where should I instantiate the addtional controls? How should I handle
> prerender (the date picker needs it)? What should I do in Render() to
> make this happen...
>
> I guess I am really trying to avoid writing properties that wrap *all*
> of the textbox properties. Any good way to do this?
>
> TIA,
> - Andrew Backer
>
Steve C. Orr [MVP, MCSD] Guest
-
Andrew Backer #3
Re: Combining Two Controls, best way?
So I have to go the composite way, eh? Oh well...
Are we sure that there is no way to inherit TextBox, thereby gaining
all it's fancy properties and methods, and *then* tacking on the
datepicker/checkbox/etc that I need?
Im going to go the composite way for now, but the other way would be
sooooooo nifty :)
Thanks for the article,
- Andrew Backer
Andrew Backer Guest



Reply With Quote

