I have created a new control VidController
public class VidController : Controller
{
public ActionResult GetVids()
{
return View();
}
}
Right clicked inside the method and created View with default name GetVids. Now when i try to o开发者_开发百科pen ~/Vid/GetVids there is no page opening...
What i have to set in Global file?Instead of opening ~/VidController/GetVids
in your browser you could try /Vid/GetVids
. In ASP.NET MVC the standard convention is that the Controller
suffix is used for the class name but removed when resolving the route.
When you call VidController/GetVids
, the routing engine is trying to find a controller named VidControllerController
which obviously doesn't exist.
精彩评论