2.7 Câu truc Views\Shared\Site.Master
01.
<%@ Master Language=
"C#"
AutoEventWireup=
"true"
CodeBehind=
"Site.master.cs"
Inherits=
"BanHang.Views.Shared.Site"
%>
02.
<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
"<a href="
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd
">http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd<;/a>"
>
03.
<html xmlns=
"<a href="
http:
//www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml<;/a>">
04.
<head runat=
"server"
>
05.
<meta http-equiv=
"Content-Type"
content=
"text/html; charset=utf-8"
/>
06.
<title><%= Html.Encode(ViewData[
"Title"
]) %></title>
07.
<link href=
"/../../Content/Site.css"
rel=
"stylesheet"
type=
"text/css"
/>
08.
</head>
09.
<body>
10.
<div
class
=
"page"
>
11.
<div id=
"header"
>
12.
<div id=
"title"
>
13.
<h1>My Sample MVC Application</h1>
14.
</div>
15.
<div id=
"logindisplay"
>
16.
<% Html.RenderPartial(
"LoginUserControl"
); %>
17.
</div>
18.
<div id=
"menucontainer"
>
19.
<ul id=
"menu"
>
20.
<li><%= Html.ActionLink(
"Home"
,
"Index"
,
"Home"
)%></li>
21.
<li><%= Html.ActionLink(
"SanPham"
,
"Index"
,
"SanPham"
)%></li>
22.
<li><%= Html.ActionLink(
"About Us"
,
"About"
,
"Home"
)%></li>
23.
</ul>
24.
</div>
25.
</div>
26.
<div id=
"main"
>
27.
<asp:ContentPlaceHolder ID=
"MainContent"
runat=
"server"
/>
28.
29.
<div id=
"footer"
>
30.
My Sample MVC Application © Copyright
2008
31.
</div>
32.
</div>
33.
</div>
34.
</body>
35.
</html>
2.8 Kêt qua
Figure 17. Kêt qua chay ưng dung khi thêm SanPham vao ưng dung ASP.NET MVC
Không có nhận xét nào:
Đăng nhận xét