The code is client-side and not server-side. You can't use the function in the code-behind. You can however call the function when you postback the page. See message #
710745 for an explanation of how to call the function by using the RegisterClientScriptBlock method.
>I wrote a small javascript program in the section of an asp.net page. I want to call the routine from a codebehind program. If I try to run the program, it can't find the method. Here's the code I expected to run:
>
>
>Dim l_retval as string = dispDialog()
>
>
>This works for calling another VB method, but not for a script routine.
>DispDialog is a script routine in the page header. How in the world do I call it?
-----------------------------------------
Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.comwww.prenia.comWeblog: blogs.prenia.com/cathi