如何导航到网站有超链接? [英] how to navigate to site With hyperlink?
本文介绍了如何导航到网站有超链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何链接到特定的网站链接
由于某种原因,它提供了文本超链接的地址而不是导航元素
HyperLink DynLink = new HyperLink(){
// 当我点击链接时,它会给我一个文本链接!而是链接导航URL
NavigateUrl = http://www.microsoft.com ,
// 喜欢这个localhost:4929 / momo
Text = momo,
};
DynLink.Load + = new EventHandler(DynLink_Load);
ListItem listItem = new ListItem(DynLink.Text);
BulletedList1.DisplayMode = BulletedListDisplayMode.HyperLink;
BulletedList1.Items.Add(listItem);
}
解决方案
a href =http://www.codeproject.com
使用适当的分页
你可以使用这个...在任何控件上设置这个
让我知道它是否有效
试试这个..
ListItem listItem = new ListItem(){Text = DynLink.Text,Value = DynLink.NavigateUrl};
How do I link to a specific website link
For some reason, it gives the address of the text hyperlink instead of the navigateurl
HyperLink DynLink = new HyperLink() {
//When I click on the link it gives me a link of the text! Instead link of the navigate url
NavigateUrl = "http://www.microsoft.com",
//like this localhost:4929/momo
Text="momo",
};
DynLink.Load += new EventHandler(DynLink_Load);
ListItem listItem = new ListItem(DynLink.Text);
BulletedList1.DisplayMode = BulletedListDisplayMode.HyperLink;
BulletedList1.Items.Add(listItem);
}
解决方案
"a href="http://www.codeproject.com"
use proper taging
you may use this...set this on any control
let me know if it works
Try this..
ListItem listItem = new ListItem() { Text = DynLink.Text, Value = DynLink.NavigateUrl};
这篇关于如何导航到网站有超链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文