On 18 déc, 11:53, "Mark Rae [MVP]" <m...@markNOSPAMrae.net> wrote:
> <timor.su...@gmail.com> wrote in message
>
[quoted text clipped - 6 lines]
> I want my own custom control to be able to add both TextBox control
> and HiddenField, not adding 2 control in my page.
Apologies, but I don't understand what the problem is...
You can have as many controls as you like in your UserControl - see examples
here:
http://www.15seconds.com/issue/020319.htm
If you want to create a UserControl which has a TextBox and a HiddenField,
then create a UserControl with a TextBox and a HiddenField - when you add it
to your page and set the various properties, it will render the HTML you
want...

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net
timor.super@gmail.com - 18 Dec 2007 12:20 GMT
Thanks for your answer, but I don't want to use UserControl because I
need some specific uses, such as RaiseCallbackEvent.
That's why I was thinking of a custom webcontrols, inheriting from
TextBox
And somewhere in a render method, render the TextBox and render the
HiddenField, but I don't know how
You see ?
> <timor.su...@gmail.com> wrote in message
>
[quoted text clipped - 26 lines]
> Mark Rae
> ASP.NET MVPhttp://www.markrae.net
Mark Rae [MVP] - 18 Dec 2007 13:07 GMT
> Thanks for your answer, but I don't want to use UserControl because I
> need some specific uses, such as RaiseCallbackEvent.
[quoted text clipped - 4 lines]
>
> You see ?
No, I'm afraid I don't... There's nothing preventing you from using
RaiseCallbackEvent in a UserControl - here's an example of how to do it with
a UserControl which contains two ListBox controls:
http://www.c-sharpcorner.com/UploadFile/LivMic/Callback_ListBoxesFT_111212006084
429AM/Callback_ListBoxesFT_1.aspx

Signature
Mark Rae
ASP.NET MVP
http://www.markrae.net
timor.super@gmail.com - 18 Dec 2007 13:43 GMT
Thanks both for your help,
The Peter's solution helps me to understand that it's very simple to
play with writer.
Mark's solution help me reconsidering what I want.
I think I will find what I want
Thanks for your help.
Best regards,
> <timor.su...@gmail.com> wrote in message
>
[quoted text clipped - 16 lines]
> Mark Rae
> ASP.NET MVPhttp://www.markrae.net