Question

Both mvcaction3 and mvcaction4 code snippets generate the same action method code as below. What is the difference between them. I am referring to the short cut mvcaction3 then double tab.

public ActionResult Action()
{
    return View();
}

Am I missing something?

Press Ctrl+Space, snippets appear. Select mvcaction3 or mvcaction4 - tab+tab -action method generated. Both the same.

Was it helpful?

Solution

Go to Add-New Project-Web. You will see MVC3 and MVC4 projects. Each MVC framework brings its snippets. It just happens that they produce the same result.

OTHER TIPS

These snippets are stored in a file like:

C:\Program Files\Microsoft ASP.NET\ASP.NET MVC 4\Visual Studio 2012\Snippets\VC#\1033\ASP.NET MVC 4\mvcaction.snippet for MVC4 and

C:\Program Files\Microsoft ASP.NET\ASP.NET MVC 3\Visual Studio 2012\Snippets\VC#\1033\ASP.NET MVC 3\mvcaction.snippet for MVC3.

These can be modified(if you want to). But by default they both are the same.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top