The requested page is not available for the requested platform. You are viewing the content for Default platform.

Declare View

Invokes the Visual Studio built-in refactoring that generates an MVC view for the current MVC action.


From the context menus or via shortcuts:

  • when the edit cursor or caret is on an MVC action declaration, provided that the appropriate view does not exist.


public ActionResult TestAction()
    return View();
Public Function TestAction() As ActionResult
    Return View()
End Function


<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">

<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">