using System;
using System.ComponentModel.DataAnnotations;
namespace HelloWorldMvcApp
{
}
@{
Layout = null;
<!DOCTYPE html>
<!-- template from http://getbootstrap.com/getting-started -->
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Test</title>
</style>
</head>
<body>
<div>
@Html.ValidationSummary()
</div>
</body>
</html>
using System.Web.Mvc;
using System.Collections.Generic;
public class HomeController : Controller
[HttpGet]
public ActionResult Index()
ModelState.AddModelError("e", "Sample Error");
return View();