Question

In a asp.net webforms project, I need to add external style sheet only to content page,

If I put css link after the <%@ Page> declaration it gives an error saying

Error   103 Validation (XHTML 1.0 Transitional): Content is not supported outside 'script' or 'asp:content' regions.

If I put it inside <asp:Content> tag error is

Error   104 Cannot switch views: Validation (XHTML 1.0 Transitional): Element 'link' cannot be nested within element 'td'.

Is it possible to add a style sheet only to content page?

Was it helpful?

Solution

You should create a place holder in the head section in master page. Then in the content page, if you want to include js, css, ... put on this place holder, unless keep it empty.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top