using System;
using System.ComponentModel.DataAnnotations;
namespace TestMvcApp
{
public class TestViewModel
public int Times;
public TestViewModel()
Random random = new Random();
Times = random.Next(1, 1000);
}
@model TestMvcApp.TestViewModel
@{
Layout = null;
<!DOCTYPE html>
<!-- template from http://getbootstrap.com/getting-started -->
<html lang="en">
<head>
</head>
<body>
<div class="row">
<div class="col-lg-12 col-md-12 col-sm-12">
<h1>
Test Application
</h1>
</div>
<h3>I've used this tool for testing equations.</h3>
<h4>I've probably used it @Model.Times times.</h4>
</body>
</html>
using System.Web.Mvc;
using System.Collections.Generic;
public class HomeController : Controller
[HttpGet]
public ActionResult Index()
return View(new TestViewModel());