I'm working on a web part that thematically makes sense to have the XSL Link property in a custom category I created Visual Settings that provides new WPProperties for things like the CSS page and which Javascript file to attach to the web part. In this sense, it makes sense for us to move that property out of Miscellanous and into this custom category.

I thought it would be just as simple as writting over the property in my code-behind, but that doesn't seem to be the case (it breaks the webpart when I do that). Any advice?

1 Answer 1


If I understand you correctly you're inheriting from a Web Part which has XSLLink in the Category Miscellanous and you want to move it to Visual Settings.

You should be able to do that like this:

[WebBrowsable(true), Personalizable(PersonalizationScope.Shared)]
[WebDisplayName("XSL Link")]
[WebDescription("Link to XSLT")]
[Category("Visual Settings")]
public new string XSLLink
  get { return base.XSLLink; }
  set { base.XSLLink= value; }
  • The line in the .webpart file has no influence. Is your new propery the exact same spelling and casing as the old? Mar 28, 2012 at 15:24
  • Yes, and in fact if you change one it changes the other. It was strange to see me delete the value in the original XSLLink property only to have the value deleted in the new property!
    – EHorodyski
    Mar 28, 2012 at 17:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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