Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/34.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net 如何根据内容页跳过母版页上的标记?_Asp.net_Master Pages - Fatal编程技术网

Asp.net 如何根据内容页跳过母版页上的标记?

Asp.net 如何根据内容页跳过母版页上的标记?,asp.net,master-pages,Asp.net,Master Pages,我有一个母版页,但当加载特定的内容页时,我想跳过放置在母版页上的一个标记。可以这样做吗?在主机的代码绑定中: protected void Page_Load(Object sender, EventArgs e) { ContentPageName page = this.Page as ContentPageName; myTag.Visible = page == null; } 你说的跳过是什么意思?请详细说明!我的意思是不在内容页上显示它。

我有一个
母版页
,但当加载特定的
内容页
时,我想跳过放置在
母版页
上的一个
标记
。可以这样做吗?

在主机的代码绑定中:

protected void Page_Load(Object sender, EventArgs e)
{
    ContentPageName page = this.Page as ContentPageName;
    myTag.Visible = page == null;
}

你说的跳过是什么意思?请详细说明!我的意思是不在内容页上显示它。