[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Markus

1/15/2003 6:36:00 PM

Yall-

I'm trying to create a custom web control for a date picker. I'm wanting to
pop up the date picker via javascript as opposed to doing it on the server.
All I see for now on how to write out the control is in the Render function.
And RegisterCLientScriptBlock doens't work from within a class that's not
inheriting Page. So basically , if I write out javascript in the Render
function and the user adds more than one of this datepicker to the page, it
writes out the same javascript duplicate times.

Does anyone know how to do this or a good place to look at how to use
javascript with a custom web control?

thanks!


1 Answer

Phillip MK Evans

1/20/2003 6:24:00 AM

0

Try (in C#):
this.Page.RegisterClientScriptBlock(...);

Phil.


"Mark" <maxmann@xceligent.com> wrote in message
news:ucjfovLvCHA.1628@TK2MSFTNGP10...
> Yall-
>
> I'm trying to create a custom web control for a date picker. I'm wanting
to
> pop up the date picker via javascript as opposed to doing it on the
server.
> All I see for now on how to write out the control is in the Render
function.
> And RegisterCLientScriptBlock doens't work from within a class that's not
> inheriting Page. So basically , if I write out javascript in the Render
> function and the user adds more than one of this datepicker to the page,
it
> writes out the same javascript duplicate times.
>
> Does anyone know how to do this or a good place to look at how to use
> javascript with a custom web control?
>
> thanks!
>
>