Script Manager

S

shapper

Hello,

Is this the right way to include a JS file into a page using Script
Manager?

' Page_PreRender
Private Sub Page_PreRender(ByVal sender As Object, ByVal e As
EventArgs) Handles Me.PreRender

With ScriptManager1
.ScriptPath = "~/App_Scripts"
.Scripts.Add(New ScriptReference("File1.js"))
.Scripts.Add(New ScriptReference("File2.js"))
End With

End Sub ' Page_PreRender

Am I using the right page event?

And how can I register a JS script block into the page?

Thanks,

Miguel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top