You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

28 lines
649 B

using HelloEmpty_ToMVC.Models;
using Microsoft.AspNetCore.Mvc;
namespace HelloEmpty_ToMVC.Controllers
{
public class HomeController : Controller
{
public IActionResult Index()
{
HelloMessage msg = new HelloMessage()
{
Message = "Welcome to ASP.NET MCV!"
};
ViewBag.Noti = "Input message and click submit";
return View(msg);
}
// Post 처리용 Index
[HttpPost]
public IActionResult Index(HelloMessage obj)
{
ViewBag.Noti = "Message Changed";
return View(obj);
}
}
}