Solved

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

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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Last week I faced a strange issue recently, i have deployed SharePoint 2003 servers for one project and one of the requirements was to open SharePoint site from same server. when i was trying to open site from the same server i was getting authentic…
If you create your solutions on SharePoint sooner or later you will come upon a request to set  permissions of the item depending on some of the item's meta-data - the author, people assigned as approvers, divisions, categories etc. The most natu…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

823 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