ClientScriptManager PARA AGREGAR CONTENIDO Y SCRIPTS A LA PÁGINA


'crear contenido web desde servidor
Dim texto as string = "
" & vbNewLine & _

               "Hola Mundo
" & vbNewLine & _     

               "
"Dim cs As ClientScriptManager = Page.ClientScript


If Not cs.IsStartupScriptRegistered(Me.[GetType](), "HolaMundo") Then
                cs.RegisterStartupScript(Me.[GetType](), "HolaMundo", texto)
End If


'crear y ejecutar script
Dim texto as string= "alert('Hello World');";
Dim cs As ClientScriptManager = Page.ClientScript


cs.RegisterStartupScript( Me.[GetType](),"HolaMundo2",texto,true);