Created
September 18, 2020 11:10
-
-
Save corespider/f7b439745bfdf82e8dfbab5b8df820d6 to your computer and use it in GitHub Desktop.
ViewData Example
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
<html> | |
<head> | |
<meta name="viewport" content="width=device-width" /> | |
<title>Customer Management</title> | |
<script src="~/lib/jquery/jquery.js"></script> | |
<link href="~/lib/twitter-bootstrap/css/bootstrap.css" rel="stylesheet" /> | |
</head> | |
<body> | |
@{ | |
var customer = ViewData["Customer"] as CustomerManagement.Models.Customer; | |
} | |
<div class="container"> | |
<h2>Page Title is : @ViewData["Title"] </h2> | |
<table class="table table-dark"> | |
<tr> | |
<td> | |
Customer Id | |
</td> | |
<td> | |
@customer.custid | |
</td> | |
</tr> | |
<tr> | |
<td> | |
Name | |
</td> | |
<td> | |
@customer.name | |
</td> | |
</tr> | |
<tr> | |
<td> | |
Address | |
</td> | |
<td> | |
@customer.address | |
</td> | |
</tr> | |
<tr> | |
<td> | |
Phone | |
</td> | |
<td> | |
@customer.phone | |
</td> | |
</tr> | |
<tr> | |
<td> | |
</td> | |
<td> | |
@customer.email | |
</td> | |
</tr> | |
<tr> | |
<td> | |
Gender | |
</td> | |
<td> | |
@customer.gender | |
</td> | |
</tr> | |
</table> | |
</div> | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment