Zieglers

Just little about C#, .NET, SQL Server, SharePoint and SAP

Document Library Search Web Part (Optional)

Posted by zieglers on September 13, 2009

This post contains the optional part of Document Library Search Web Part post: https://zieglers.wordpress.com/2009/09/08/document-library-search-web-part/

In this post, I’ll try to show,

  • How to bind a SharePoint document library to ListName instead of ListId,
  • How to modify SPDataSource, so that subsite document libraries can be searched recursively,
  • How to extend search scope to other columns by adding more parameters.

Binding a SharePoint document library to ListName instead of ListId

In order to do this, you can simply follow this post: http://blog.solanite.com/keith/Lists/Posts/Post.aspx?ID=3

Idea is very simple: Search web part definition for ListID, replace it ListName. Then look for GUID and replace it with the list name you want to bind to.

Replace ListID with ListName

Replace ListID

Replace GUID with list name you want (For our demo, list name was Documents in the previous post)

List GUID

Replace ListName

Note: In some cases, there might be brackets around GUID value. If this is the case, make sure your list name is not in brackets after you perform replace operation.

That’s it. Now, your data view web part is bound to ListName instead of ListID.

Modifying SPDataSource so that subsite document libraries can be searched recursively

to be continued.

zieglers

Advertisements

One Response to “Document Library Search Web Part (Optional)”

  1. aquasana aq-4100 deluxe shower filter…

    […]Document Library Search Web Part (Optional) « Zieglers[…]…

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

 
%d bloggers like this: