Solved

Data view web part get parameters from cookies - how to force url decode

Posted on 2011-02-21
3
1,160 Views
Last Modified: 2012-05-11
Using windows sharepoint services 3.0 and sharepoint designer 2007.

I am passing data to a sharepoint dataview web part using a cookie. The dataview web part is configured to have a parameter whose source is the cookie.  The coookie itself, is being created using javascript.

In general, this is working well except that sometimes the text value saved to the cookie needs to include characters such as semi-colons.   In these cases, if I just try to save the raw text to the cookie in javascript, only the text before the first semi-colon is saved, causing an error when the cookie is later read by the sharepoint dataview web part.

If I encode the text using javascript escape (or other encode methods), the encode text is saved to the cookie correctly but now when the parameter is read by the sharepoint data view web part, it reads the encoded text and again this causes an error.

I cannot find any way to make the sharepoint dataview unencode the text saved in the cookie as it reads it.  The parameter is being used to control the filtering of the dataview so there is no option to post-process the parameter before it is used.  I also cannot pass the data in any other way.  We are actually passing a lot of data to the data view and have tried using the query string before.  The query string works but under certain situations, the query string becomes to long for the browser (particularly IE7).

I am sure this must be quite a common scenario. As far as I understand, it is quite common to encode text saved to cookies.

Can anyone advise how to make sharepoint decode the cookie text as it is read in?
0
Comment
Question by:evanstest
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 3

Expert Comment

by:Nomoho
ID: 35025900
Hello, I don't know what is your problem, but SharePoint has a SPEncode utility class:
http://msdn.microsoft.com/fr-fr/library/microsoft.sharepoint.utilities.spencode_members(v=office.12).aspx
0
 
LVL 1

Accepted Solution

by:
evanstest earned 0 total points
ID: 35234413
never found a solution to this question
0
 
LVL 1

Author Closing Comment

by:evanstest
ID: 35304293
never found a solution
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For SharePoint sites, particularly public-facing ones, there are times when adding JavaScript, Meta Tags, CSS Styles or other content to the page <head> section is more practical than modifying master pages.  For instance, you could add the jQuery l…
When using a search centre, I'm going to show you how to configure Sharepoint's search to only return results from the current site collection. Very useful when using Office 365 with multiple site collections.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question