Top "Asp.net-mvc-4" questions

ASP.

Runtime error: Could not load file or assembly 'System.Web.WebPages.Razor, Version=3.0.0.0

I tinkered with my ASP.NET MVC4 packages via NuGet, and now System.Web.WebPages.Razor v3 won't load. Sometimes …

c# asp.net-mvc-4 razor runtime-error
"Templates can be used only with field access, property access, single-dimension array index, or single-parameter custom indexer expressions" error

Why am I receiving the error: Templates can be used only with field access, property access, single-dimension array index, or …

c# asp.net string asp.net-mvc-4
Email address validation in C# MVC 4 application: with or without using Regex

I have an MVC 4 web application and I need to enter and validate some email addresses, without sending an email …

c# regex asp.net-mvc asp.net-mvc-4 email-validation
Return HTML from ASP.NET Web API

How to return HTML from ASP.NET MVC Web API controller? I tried the code below but got compile error …

c# html asp.net-mvc asp.net-mvc-4 asp.net-web-api
Using Cookie in Asp.Net Mvc 4

I have web application in Asp.Net MVC4 and I want to use cookie for user's login and logout. So …

c# asp.net-mvc-4 cookies action httpcookie
When should I use Async Controllers in ASP.NET MVC?

I have some concerns using async actions in ASP.NET MVC. When does it improve performance of my apps, and …

c# asp.net asp.net-mvc-4 asynchronous async-await
Test method is inconclusive: Test wasn't run. Error?

I have a test class and below I have posted a sample test from the test class namespace AdminPortal.Tests.…

c# asp.net-mvc asp.net-mvc-4 unit-testing resharper
Redirect from asp.net web api post action

I'm very new to ASP.NET 4.0 Web API. Can we redirect to another URL at the end of the POST …

asp.net-mvc c#-4.0 asp.net-mvc-4 asp.net-web-api
Cannot attach the file *.mdf as database

Basically I've followed a tutorial and decided to delete the .mdf file afterwards. Now whenever I try to run the …

.net asp.net-mvc database entity-framework asp.net-mvc-4
Razor MVC Populating Javascript array with Model Array

I'm trying to load a JavaScript array with an array from my model. Its seems to me that this should …

javascript arrays asp.net-mvc asp.net-mvc-4 razor