如何制作可点击的链接? [英] How do i make a clickable link?
本文介绍了如何制作可点击的链接?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是的.
我在Visual Studio C#2010中工作,我想创建一个可单击的链接(如按该链接时),应弹出一个新表单.我知道在按下按钮时弹出新表格的代码,所以我想它是相同的代码.但是我该怎么做,就像当您轻按两下一个按钮,然后弹出整个代码一样.有动作-例如"button_1单击".
除了文本,我该怎么做?谢谢你.并请友好的向我解释一下,因为这是编程的新手.
Yo.
Im working in Visual Studio C# 2010 and i want to make a clickable link - like when you press it - a new form should pop up. I know the code to make a new form pop up when you press a button, so i guess it''s the same code. But how do i make a action like when you douple-tap a button, then the whole code pops up. There''s the action - e.g "button_1 Click".
How do i do the same thing, but with text? Thank you. And please explain it to me noob friendly, because im new to programming.
推荐答案
如果控件没有Click
事件,只需处理LeftMouseButtonUp
事件.
If there''s noClick
event for a control, just handle theLeftMouseButtonUp
event.
使用链接按钮及其clientclick编写"javascript:pagename"
take linkbutton and its clientclick write "javascript:pagename"
假设您说"link" 并不意味着打开网页,或引用URI/URL :
如果要在单击纯文本不可编辑"文本时执行某项操作,请使用标签,并为其定义"Click事件处理程序",然后在该Click事件处理程序中执行所需的操作.
Assuming that when you say "link" you do not mean opening a web page, or refer to a URI/URL:
If you want to do something when "plain not-editable" text on your Form is Clicked, use a Label, and define a ''Click event handler for it, and in that Click event handler do what you need to do.
这篇关于如何制作可点击的链接?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文