mirror of
https://github.com/rudollee/LearningMVC.git
synced 2026-08-11 16:32:55 +00:00
Ch. 20 View - WorkingWithRazor
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Mvc;
|
||||
|
||||
namespace WorkingWithRazor.Controllers
|
||||
{
|
||||
public class HomeController : Controller
|
||||
{
|
||||
public ActionResult Index()
|
||||
{
|
||||
string[] names = { "Apple", "Orange", "Pear" };
|
||||
return View(names);
|
||||
}
|
||||
|
||||
public ActionResult List()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
|
||||
[ChildActionOnly]
|
||||
public ActionResult Time()
|
||||
{
|
||||
return PartialView(DateTime.Now);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user