开发者

MOSS Filter webpart not working with & symbol in the query string

I know this is a fairly common error with URL encoding. The problem I suspect is the MOSS Filter webpart used to filter a dataview webparts results based on the querystring paramter passed to it from the Filter webpart.

When the query string contains an & (ampersand) symbol the dataview webpart is unable to display any results but does not display any errors.

When I replace the ampersand in the query string below with %26 then I get an exception 'In开发者_C百科put string was not in a correct format'

http://localhost/subsite/Pages/Test.aspx?SS=Test%20Governance%20&%20Directors no error caused but filter (SS) passed to the Data view webpart shows no results.

http://localhost/subsite/Pages/Test.aspx?SS=Test%20Governance%20%26%20Directors replacing the & with %26 produces an exception 'Input string was not in a correct format' is thrown

Can we use the ampersand in the query string from a Filter webpart? I have read that the consumer webpart reads this as another parameter being passed to it, maybe that is the problem? Though I have configured the Filter webpart to only pass the first parameter.


Well just had to change & to and in the end...


There is a bug in SP's Query String URL Filter web part.

The Query String URL Filter will not work if the field Type is "Multiple Lines of Text" and the value includes the '&' character. Even if you encode it to %26.

Change the column type to "Single Line of Text". See if that magically solves your problem.


For me in sharepoint 2010 sp1 august updates with the query string (URL) filter, bobince's double url encode worked for me.. Thanks bob i was pulling my hair out


By default SharePoint will encode & to %26 if not encoded then encode & to %26. Also add the parameter &useFiltersInViewXml=1 to the filter view URL. It should work for you.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜