How to apply javascripts in asp.net and where?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Devendra Pratap Singh
    New Member
    • May 2010
    • 1

    How to apply javascripts in asp.net and where?

    sir i want to add javascripts in my website. i have used master pages and sub pages in my website so i want to apply validations in my website. so please tell me where to place javascript code either in master page or sub page?

    Please give me some demo on this with some javascripts example..
    thanx
  • Frinavale
    Recognized Expert Expert
    • Oct 2006
    • 9749

    #2
    It would depend on whether or not every page needs to use the JavaScript or if the JavaScript is specific to a particular page (or even control).

    If the JavaScript is used in many pages then place the code that adds the reference to it in your MasterPage.

    If the JavaScript is used by only a particular page, then place the code that adds the reference to it in your content page.

    -Frinny

    Comment

    Working...