I’m just learning MVC4, so this is a very basic question.
I have a string of text that I’d like to display on multiple pages. What is the best practice to accomplish this (other than copying/pasting it into each cshtml)?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If it’s going to be on every page, put it in the _layout file as Maess suggested. If you only want it in specific views, you can create a partial view and just insert that wherever you want it to display.