I have added one custom property in my SharePoint 2010 site, which gives me a TextBox to fill values.
My requirement is I want one Text with HyperLink on it.
How can I add HyperLink Property to my Visual Web Part??
It should looks like below:
Out-of-box , a custom property is rendered in the "Modify Web Part" pane based on its type as :
So, if you want to see a control in the property pane to enter a url (like SharePoint Url field), you have to develop a custom EditorPart for that Webpart.
If you just want to render it as hyperlink in webpart, you can use two string properties for text and href and build the link in code to render. For e.g :
I think maybe the easiest way to do this is to provide two separate fields, one for the link's display text and another for the link itself, and to dynamically build the link you need in the Visual Web Part's code behind.