Tell me more ×
Stack Overflow is a question and answer site for professional and enthusiast programmers. It's 100% free, no registration required.

Good day,

I want to make a global variable of a string for the src location of my css files so that i don't have to type it out every time, and if I change the position of it then i just need to change it in one place and it will automatically be used in all the views.

How should I go about doing this?

I do not know where to declare such a variable? I can make a class called global variables. but then how do I make that class be automatically included in all my views?

share|improve this question
Check /Views/Shared folder for _Layout.cshtml. You can add your css there once and should be available on other pages – codingbiz Jul 13 at 9:12

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.