You can output any javascript dynamically from your code behind using such
function as:

RegisterStartupScript:
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWebUIPageClassRegisterStartupScriptTopi c.asp[/url]

RegisterClientScriptBlock:
[url]http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWebUIPageClassRegisterClientScriptBlock Topic.asp[/url]

Attributes.Add:
[url]http://www.flws.com.au/showusyourcode/codeLib/code/NET_jsAddTo.asp?catID=5[/url]

--
I hope this helps,
Steve C. Orr, MCSD
[url]http://Steve.Orr.net[/url]


"Chuck Traywick" <ctrawick@uslec.net> wrote in message
news:408301c35600$3758a190$a001280a@phx.gbl...
> Wanted to try to attach code to either a webform button
> or an HTML button the "old" way with
> onclick="mysciptroutine" but get an error when I try to
> do this that indicates the script block needs to be
> registered.
>
> Is there an example of how to do this somewhere?
>
> Thanks
>
> Chuck
>