1

I have created a custom Search results web part by inheriting from coreresultswebpart. I would like to override the default XSL with some modified XSL in my project instead of having to set the XSL using the web part properties on the site.

I have already added a few custom properties to my custom webpart and found a msdn article discussing the DataFormWebPart.Xsl Property. Just not sure how to take my modified XSL and set it to that property.

1 Answer 1

2

In your webpart constructor just set the property there.

public MyCustomWebpart()
{
     this.Xsl = "<xml></xml>";
}
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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