Forums - C# Corner

Forum guidelines
mohammed shamsheer

mohammed shamsheer

  • 1.3k
  • 222
  • 89.4k

Specified view name for Grid.Mvc not found. ViewName: _Grid

Jun 18 2016 1:10 AM
this is my mvc view : 
 
@using GridMvc.Html
@model IEnumerable<MVCGYMONE.Models.Users>
@{
ViewBag.Title = "AllRegisterUserDetails";
}
<link href="@Url.Content("~/Content/Gridmvc.css")" rel="stylesheet" />
<link href="~/bootstrap/css/bootstrap.min.css" rel="stylesheet" />
<script src="@Url.Content("~/Scripts/jquery-1.9.1.min.js")"></script>
<script src="@Url.Content("~/Scripts/gridmvc.min.js")"></script>
<link href="~/Content/Site.css" rel="stylesheet" />
<div class="container">
<div class="logo col-sm-12 text-center col-md-12"><img alt="" src="~/Images/dotnetsai.png" /></div>
<div class="clearfix"></div>
<fieldset>
<legend class="legend">All Users</legend>
<div class="panel">
<div class="panel-body">
<div>
@Html.ActionLink("Create User Account", "Register", "Account", new { @class = "btn btn-info btn-pressure" })
</div>
<div style="margin-top: 10px"></div>
@Html.Grid(Model).Columns(columns =>
{
columns.Add(c => c.Id).Titled("Id").Encoded(false)
.Sanitized(false).SetWidth(50);
columns.Add(c => c.UserName).Titled("UserName").Filterable(true).Encoded(false)
.Sanitized(false).SetWidth(50);
columns.Add(c => c.EmailID).Titled("EmailID").Filterable(true).Encoded(false)
.Sanitized(false).SetWidth(50);
}
)
</div>
</div>
</fieldset>
</div>
 
 
my controller :
 
[HttpGet]
[AllowAnonymous]
public ActionResult AllRegisterUserDetails()
{
var Users = objIAccountData.GetAllUsers();
return View(Users);
}
  -------------------------------
 while compiling showing the error : 
 

Specified view name for Grid.Mvc not found. ViewName: _Grid

 
------------------------------------ 
 

Answers (2)