Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I would like to add a hyperlink to a custom web part which will take the users to a web page on a new window with the configuration settings for the web part. If I try and add a text property as below, it will have a textbox associated with it.

[WebBrowsable(true),
Category("News Options"),
Personalizable(PersonalizationScope.Shared),
WebDisplayName("Click the link below to view configuration settings")]
public string WebPartSettingsPage
{
  get;
  set;
}

Is there a way to add something similar to a label control that would just display a link the users can can click?

share|improve this question
add comment

2 Answers

The only option is to create a custom editor part. Check out this msdn example.

share|improve this answer
add comment

Calling the MSOTlPn_ShowToolPane2Wrapper javascript function will open the web part in edit mode. Add this line to CreateChildControls():

this.Controls.Add(new LiteralControl(string.Format(@"<BR>This Web Part has not been configured. <A href=""javascript:MSOTlPn_ShowToolPane2Wrapper('Edit',this,'{0}')"">Open the tool pane</A> to configure properties.<BR><BR>", this.ID)));
share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.