Created
September 18, 2020 11:07
-
-
Save corespider/0edaaf7d0eb2d0a3bd10fb685d16caaa to your computer and use it in GitHub Desktop.
ViewData Result
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class HomeController : Controller | |
{ | |
public ViewResult Index() | |
{ | |
ViewData["Title"] = "Customer Details"; | |
Customer _customer = new Customer() { | |
custid = 1, | |
name = "John Smith", | |
address = "USA", | |
phone = "6737540477", | |
email = "john.smith@outlook.com", | |
gender = "Male" | |
}; | |
ViewData["Customer"] = _customer; | |
return View(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment