开发者

How to get the selected pictures in a picture library in SharePoint

Is there a way to get the selected pictures in a picture library with the object model in SharePoint? It seems there is开发者_开发百科 not a selected flag with each picture item in the library.


SPPictureLibrary pictureLibrary = (SPPictureLibrary)web.Lists[""].Views["Selected"]


I would first ask when you want to select the pictures? There is a button on your library that triggers a postback? If yes, you can use javascript (or something smarter, jquery) to grab all selected IDs (the IDs should have to be visible in the view) or try to grab it by the request.form sent during the postback.

This is related to the page state, the ListItems would have carry such information (selected) because it happens differently for every user.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜