Answer the question
In order to leave comments, you need to log in
Why doesn't my MVC version match the examples?
The question is this, in all MVC educational material Code examples don't match the templates in my VS.
Here is one example, tell the problem which version I need to make these examples work.
CODE from examples Home controller, default project, mvc 4
Класс HomeController
using System.Web.Mvc;
namespace Guestbook.Controllers
{
public class HomeController : Controller
{
public ActionResult Index()
{
ViewBag.Message = "Modify this template to jump-start";
return View();
}
public ActionResult About()
{
ViewBag.Message = "Your quintessential. . . ";
return View();
}
}
Public Class HomeController
Inherits System.Web.Mvc.Controller
Function Index() As ActionResult
ViewData("Message") = "Modify this template to jump-start your ASP.NET MVC application."
Return View()
End Function
Function About() As ActionResult
ViewData("Message") = "Your app description page."
Return View()
End Function
Function Contact() As ActionResult
ViewData("Message") = "Your contact page."
Return View()
End Function
End Class
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question