在 vb.net 中的标签内放置超链接
我的 vb.net 代码中有这个。 label1.text =“单击此一个继续”
现在,对于标签文本中的此一个,我想给它一个超链接或response.redirect。我有什么想法可以做到这一点吗?
i have this in my vb.net code.
label1.text = "Click on THIS ONE to proceed"
Now for the THIS ONE in the label text i want to give it a hyperlink or response.redirect. Any ideas how i can do this?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我的建议是按照以下方式进行。
将 Label 控件替换为 Literal,然后这样做
My recommendation here would be to do it the following way.
Replace the Label control with a Literal then do it this way
您不能在单个标签内执行此操作。
相反,您可以使用
Literal
控件 并设置Text
以包含标记。
或者,您可以使用服务器端超链接控件。
You cannot do this inside a single label.
Instead, you can use a
Literal
control and set theText
to include an<a>
tag.Alternatively, you can use a server-side hyperlink control.