all groups > sql server reporting services > june 2005 >
You're in the

sql server reporting services

group:

how to handle & in value passed via url


how to handle & in value passed via url MJ Taft
6/6/2005 12:11:04 PM
sql server reporting services:
I have a report that is being requested from an asp page that is building a
url.
It is passing the client name as one of the parameters and some of the
client names have ampersands in them (L & M Communications) How do I pass
the value that contains an ampersand? Similarly ... would a comma present a
problem as well as in Client, Inc. ?

The parameters should be &ClientName=L & M Communications
@"http://usservername.com/ReportServer?/In
Development/URLresponseMonthly&PM_CLIENT_CODE=L & M
Communications&PM_GROUP_PATH=\\L & M
Communications\433\&rc:Parameters=Collapsed&PM_USE_TREE=T"
RE: how to handle & in value passed via url bradsy NO[at]SPAM Online.Microsoft.com (
6/7/2005 9:44:28 PM
Try using URLEncoding on the parameter values.

HttpUtility.UrlEncode("\\L & M Communications\433\")
--------------------
| Thread-Topic: how to handle & in value passed via url
| thread-index: AcVqy3xpGEzeeuEqQx2i1KGsOFlqoA==
| X-WBNR-Posting-Host: 192.85.50.2
| From: "=?Utf-8?B?TUogVGFmdA==?=" <MJTaft@discussions.microsoft.com>
| Subject: how to handle & in value passed via url
| Date: Mon, 6 Jun 2005 12:11:04 -0700
| Lines: 13
| Message-ID: <F0AE61F1-D66E-4F4E-BA2B-CADD8D47C3DE@microsoft.com>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="Utf-8"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Content-Class: urn:content-classes:message
| Importance: normal
| Priority: normal
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
| Newsgroups: microsoft.public.sqlserver.reportingsvcs
| NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
| Path: TK2MSFTNGXA01.phx.gbl!TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl microsoft.public.sqlserver.reportingsvcs:45375
| X-Tomcat-NG: microsoft.public.sqlserver.reportingsvcs
|
| I have a report that is being requested from an asp page that is building
a
| url.
| It is passing the client name as one of the parameters and some of the
| client names have ampersands in them (L & M Communications) How do I
pass
| the value that contains an ampersand? Similarly ... would a comma
present a
| problem as well as in Client, Inc. ?
|
| The parameters should be &ClientName=L & M Communications
| @"http://usservername.com/ReportServer?/In
| Development/URLresponseMonthly&PM_CLIENT_CODE=L & M
| Communications&PM_GROUP_PATH=\\L & M
| Communications\433\&rc:Parameters=Collapsed&PM_USE_TREE=T"
|
|
RE: how to handle & in value passed via url MJ Taft
6/8/2005 8:36:16 AM
Actually I received another solution that worked - we replaced the ampersand
(&) with %26 and that works perfectly

[quoted text, click to view]
AddThis Social Bookmark Button