主页中的主页按钮 [英] Home button in master page
本文介绍了主页中的主页按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个母版页,有3个内容页,分别是cp1,cp2和home.
我在主页上有一个通用按钮,可以说bntHome进入主页.
如果我打开cp1或cp2并单击btnHome,则它将打开主页.
I have a master page and have 3 content page say cp1, cp2 and home.
I have a common button in master page to go home page say bntHome.
if i opened cp1 or cp2 and click btnHome then it open the home page.
what is the code for that?
推荐答案
在 bntHome Click 事件中编写以下代码.
Write the below code in bntHome Click event.
Response.Redirect("Home.aspx");
您的按钮在母版页中.因此,您不必担心内容页面.
Your button is in master page. So you don''t worry about content pages.
您是否在按钮click事件处理程序中尝试了此操作?
Did you try this in the button click event handler?
Response.Redirect("~/MyHomePage.aspx");
在buttonclick上尝试一下
try it out onbuttonclick
Response.Redirect("Home.aspx");
这篇关于主页中的主页按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文