I think your problem is with refrencing the CSS file. Try different scenarios like ".. The content you requested has been removed. Ask a question. Quick access. Search related threads. Remove From My Forums. Answered by:.
Archived Forums. I have an aspx file that references a couple of user controls ascx like this:. I am interested in customizing some elements on the page e. CSS file:. Parser Error Message: Only Content controls are allowed directly in a content page that contains Content controls. Is there a workaround so I can include [in the same file! Many thanks in advance. By default, your master page should have something like this a reference to the head section of the page :.
And as for the error you are getting, this is because if a page has a master page, it cannon have any content outside of the. Update: You wrote you use master page , so putting it in the head section there should solve the issue. It worked for you, so I'm writing it, so it can also be helpful for the other people who have a similar issue. So you're limited to putting them inside the tag. Stack Overflow for Teams — Collaborate and share knowledge with a private group.
Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 9 years, 7 months ago. Active 9 years, 7 months ago. Viewed 2k times. You may also render the bundle by calling Styles. Render , wich generates equivalent output to using :. You may need to customize properties of the link tag, especially the media property if you want to include styles spefifically for screen or printing. There are two basic ways of doing this, and my preferred method is the first of the two.
Use Styles. RenderFormat to render links to the bundle with a custom format. Url , this is my preferred means of customizing the tag used when adding a CSS bundle. Note: Styles. Url always forces bundling and minification, even in dev, and even with BundleTable.
See more details below. The debug property in the compilation tag in Web. Note that Styles.
0コメント