惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Apple Machine Learning Research
Apple Machine Learning Research
J
Java Code Geeks
博客园 - 聂微东
Microsoft Azure Blog
Microsoft Azure Blog
量子位
T
Tailwind CSS Blog
Vercel News
Vercel News
I
InfoQ
Stack Overflow Blog
Stack Overflow Blog
U
Unit 42
Engineering at Meta
Engineering at Meta
L
LangChain Blog
大猫的无限游戏
大猫的无限游戏
D
Docker
博客园_首页
P
Proofpoint News Feed
月光博客
月光博客
T
The Blog of Author Tim Ferriss
MyScale Blog
MyScale Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
Martin Fowler
Martin Fowler
腾讯CDC
N
Netflix TechBlog - Medium
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More

博客园 - 小龟爬爬

利用浏览器 UA 信息解决多平台手机应用下载问题 Visual Studio 2010 Professional MSDN版已出,非试用版 基于OAI协议元数据收割的.NET资源 关于LNK2001错误的一些总结 C++预处理命令""和<>的区别 - 小龟爬爬 - 博客园 Mozilla Firefox 3.0 官方下载(附下载日证书截图) 在 Windows Server 2008 上安装 IIS 7.0 Visual Studio SharePoint工作流功能具有特定的安装要求 Mcafee官方卸载工具 磁盘变RAW文件系统解决办法 GridView列数字、货币和日期的显示格式 - 小龟爬爬 - 博客园 .net2.0 GRIDVIEW弹出删除对话框 - 小龟爬爬 - 博客园 FCKeditor出现&quot;this connector is disabled Please check the&quot;editor/filemanager/connectors/aspx/config.aspx&quot;错误的解决办法 FCKeditor出现&quot;XML request error: Internal Server Error(500)&quot;错误的解决办法 经常使用的判断string是否为数字的函数 string 与 stringBuilder Access 至少一个参数没有被指定值 解决方法 JS判断字符串格式是否合法 JavaScript使用技巧精萃
.NET2.0学习笔记(一)访问母版页中的控件
小龟爬爬 · 2008-01-13 · via 博客园 - 小龟爬爬

    由于项目的需要,正式的开始使用VS2005,以前也只是看过一些相关的内容,为了加强一下记忆,特此开始.NET2.0的学习笔记系列。
   

弱类型:使用FindControl方法。
强类型:在母版页中定义属性,内容页通过属性访问母版页中的内容。

访问母版页中的控件(弱类型)
In the master page…
<asp:Label ID="Title" RunAt="server" />
In the content page…
((Label) Master.FindControl ("Title")).Text = "Orders";

访问母版页中的控件(强类型)
In the master page…
<asp:Label ID="Title" RunAt="server" />
  .
  .
  .
<script language="C#" runat="server">
public string TitleText
{
    get { return Title.Text; }
    set { Title.Text = value; }
}
</script>

In the content page…
((Site)Master).TitleText = "Orders";