?
Solved

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

Posted on 2011-02-21
3
Medium Priority
?
1,175 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

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…
These days socially coordinated efforts have turned into a critical requirement for enterprises.
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

762 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