Solved

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

Posted on 2011-02-21
3
1,130 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
  • 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

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

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

The vision: A MegaMenu for a SharePoint portal home page The mission: Make it easy to maintain. Allow rich content and sub headers as well as standard links. Factor in frequent changes without involving developers or a lengthy Dev/Test/Prod rel…
We had a requirement to extract data from a SharePoint 2010 Customer List into a CSV file and then place the CSV file into a directory on the network so that the file could be consumed by an AS400 system. I will share in Part 1 how to Extract the Da…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

821 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