views:

39

answers:

1

In sharepoint, when you post a long annoucement the webpart trims it to the first two lines but preserves any links in the html.

I'm trying to create a custom webpart that trims long text and want to reuse this functionality. Does anyone know where in the sharepoint libraries it lies?

+2  A: 

What makes announcements appear trimmed is this specific line in the <ListViewXml /> tag inside the webpart code on the page:

<Limit Len="250" MoreText="..." AutoHyperLink="TRUE" AutoNewLine="TRUE"><Column Name="Body"/></Limit>

These properties map to the SPQuery class, and you might be looking for the AutoHyperLink property.

F.Aquino