How to put javascript in a page using masterpage?

Question:

How to put javascript in a page using masterpage? Error message: Validation (XHTML 1.0 Transitional): Content is not supported outside ‘script’ or ‘asp:content’ regions.

Answer:

Place the script inside the <asp:content> tag. Because you are using content area and a master page, the
id will be prefixed with the master and content area names. you should use ClientId to get the actual rendered names.

Link: http://www.velocityreviews.com/forums/t368066-how-to-put-javascript-in-a-page-using-masterpage.html

发表评论

电子邮件地址不会被公开。

您可以使用这些 HTML 标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>