在Button Click事件上打开母版页 [英] Open master page on Button Click event

查看:102
本文介绍了在Button Click事件上打开母版页的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有两个母版页,按钮点击事件我想打开特定的母版页,所以怎么做...

解决方案

母版页不能要自己打开,它不是一个单独的实体。您通过将母版页链接到实际内容页面来使用母版页...

 <  ![CDATA [<%@     Page  < span class =code-attribute>  语言  =  C#    MasterPageFile   =  〜/ MasterPages / Master1.master   标题  = 内容页面  > ]]> 



(您也可以从后面的代码设置母版页。 ..)


I have two master pages, on button click event I want to open particular master page, so how to do this...

解决方案

Master page can not be opened y itself, it is not an individual entity. You use a master page by linking it to an actual content page...

<![CDATA[<%@ Page Language="C#" MasterPageFile="~/MasterPages/Master1.master" Title="Content Page"%>]]>


(You can set master page also from code behind...)


这篇关于在Button Click事件上打开母版页的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆