View is a user interface. View displays data from the model to the user and also enables them to modify the data. ASP.NET MVC views are stored in Views folder.
Question:how to display/render "@" symbol as string in mvc view as razor syntax uses the @ symbol to transition from HTML to C#?
Description:I am trying to write following code in my MVC View. <script type="application/ld+json"> { "@context" : "http://mywebsite.com", "@type" : "WebSite" } </script> but it is throwing error "The name 'context' does not exist in the current context" as it consider it as C# code.
Posted by: Samantha Jones | Posted on: Jun 27, 2019
Question:send multiple models or parameters from controller to view?
Description:if I need to send multiple models and some parameters to my view what will be the best approach ? one way I know is to use viewbag variable but someone told me that its not a very good approach because it does not provide the intellisense. So a bit confused which approach can fulfil the requirement
Posted by: Jhon Anthony | Posted on: Oct 12, 2018