0

I have an mvc 3 razor web application that uses several graphic components from a library.

I have set all the component in the library, I need to add a css file to the library but I dont know how to do it.

so how can I add a css file witch is a library ressource to a cshtml file. I tried this but it doesnt work:

@section Styles {
<link href="@Url.Content("~/file.css")" />}
1
  • Does your _Layout.cshtml file contain a @RenderSection("Styles")? Commented Mar 1, 2012 at 14:57

1 Answer 1

2

add the rel=stylesheet attribute to that link

Sign up to request clarification or add additional context in comments.

1 Comment

thank you for your response, I added rel="stylesheet" type="text/css" /> but the file is not reachable i think, I placed it within the library and i want to call it from the cshtml file but I can't.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.