mirror of
https://github.com/rudollee/LearningMVC.git
synced 2025-06-07 16:06:21 +00:00
28 lines
500 B
C#
28 lines
500 B
C#
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);
|
|
}
|
|
}
|
|
} |