Solved

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

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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

I recently came across an issue with a MOSS 2007 deployment where access into some sub-sites were denied, even for the MOSS farm administrators. A bit of background to the setup of this MOSS farm; this was a three server setup, consisting of a fr…
I used to be SharePoint evangelist in our company, so my Outlook always full of questions about how to do this, or where I can find that. One day I found such an email with the following question: "how to attach 3-State workflow (one of the workflow…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

757 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

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now