Where to insert Javascript for Client page?

  • Thread starter Thread starter NewTel
  • Start date Start date
N

NewTel

I'm only, it seems allowed to insert my javascript in the master page.
Yet I only want it to run for one of my content pages.
How to handle.
Thanks
 
Manually added JS is usually placed in the head and best as include.
 
To add JavaScript to a page at runtime I suggest you use
Page.ClientScript.RegisterClientScriptBlock
Then you don't have to worry about where its output because ASP.NET takes
care of it for you.
 

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

Back
Top