```csharp // Views/Home/Index.cshtml @{ // ViewBag.Title = "Home Page"; Layout = null; } <h1>Home</h1> <form action="~/Home/SayHi" method="get"> Name: <input name="username" /> <br /> <input type="submit" value="Button" /> <span>@ViewBag.greeting</span> </form> // Controllers/HomeController.cs public ActionResult Index() { return View(); } public ActionResult SayHi(string username) { ViewBag.greeting = "Hi " + username; return View(nameof(Index)); } ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up