ASP.NET Web Pages – 对象
来源:互联网 发布:retrofit post json 编辑:程序博客网 时间:2024/06/06 23:46
Web Pages 通常与对象相关。
Page 对象
您已经见到过一些使用过的 Page 对象:
@RenderPage("header.cshtml")@RenderBody()
在前一章,您已看到两个用过的 Page 对象属性(isPost 和 Request):
If (isPost) {if (Request["Choice"] != null {
Page 对象的一些方法
Page 对象的一些属性
Page 属性(Page 对象的)
Page 对象的 Page 属性,提供对页面、布局页和分页之间共享的页数据的类似属性的访问。
您能够像 Page 属性添加(使用)自己的属性:
- Page.Title
- Page.Version
- Page.anythingyoulike
Page 属性很有用。举例,可以在内容文件中设置页面标题,然后在布局文件中使用它:
Home.cshtml
@{Layout="~/Shared/Layout.cshtml";Page.Title="Home Page"}<h1>Welcome to W3School</h1> <h2>Web Site Main Ingredients</h2><p>A Home Page (Default.cshtml)</p><p>A Layout File (Layout.cshtml)</p><p>A Style Sheet (Site.css)</p>
Layout.cshtml
<!DOCTYPE html><html><head><title>@Page.Title</title></head><body>@RenderBody()</body></html
阅读全文
0 0
- ASP.NET Web Pages – 对象
- ASP.NET Web Pages
- ASP.NET Web Pages
- ASP.NET Web Pages
- ASP.NET Web Pages
- ASP.NET Web Pages
- ASP.NET Web Pages
- ASP.NET Web Pages
- ASP.NET Web Pages
- ASP.NET Web Pages
- ASP.NET Web Pages
- ASP.NET Web Pages
- ASP.NET Web Pages
- ASP.NET Web Pages
- ASP.NET Web Pages
- ASP.NET Web Pages
- ASP.NET Web Pages
- ASP.NET Web Pages
- 关于各种串口
- Freemarker 运算符
- JSON数据
- poj 1050(DP)
- linux 使用技巧
- ASP.NET Web Pages – 对象
- Redis存储性能测试
- 《珠珠图案》教程一:字体、布局、保存。
- hdu6059 字典树维护数位统计异或对数
- JFreeChart-图表绘制
- L1-023. 输出GPLT
- 欢迎使用CSDN-markdown编辑器
- [Zabbix] 邮件告警
- 观察者模式