在母版页概念中,如何同时添加带有文本链接的图像 [英] In Master page concept how to add both image with text link

查看:56
本文介绍了在母版页概念中,如何同时添加带有文本链接的图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

朋友们!

在母版页概念中,当单击主页"按钮时,我要显示主页图像.

hi friends!

in master page concept when click the home page button and i want displaying a homepage image.

推荐答案

HyperLink HyperLink1 = (HyperLink)Master.FindControl("HyperLink1");
if (HyperLink1 != null)
{
HyperLink1.NavigateUrl = "http://www.google.com/";
HyperLink1.Text = "Changing Text From Child Page";
}


此代码将找到母版页中存在的超链接,并设置该超链接的文本.

同样,您可以添加更改图像,该图像显示在母版页中.


This code will find the hyperlink present in the master page and set the text of the hyperlink.

Similarly you can add change the image,which are present in the master page .


这篇关于在母版页概念中,如何同时添加带有文本链接的图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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