Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

can't put a url into the value of a key in appSettings (web.config)

0 views
Skip to first unread message

Jason Shohet

unread,
Dec 23, 2003, 2:00:08 PM12/23/03
to
in web.config, I want to have a key in appSettings:

<add key="Url" value="http://gisbox/mypage.htm?action=state&city="/>

But that value doesn't take... I get an error saying it expects a semicolon.
Any idea why? If I just put value = "abc" it works fine.

TY
Jason Shohet


bruce barker

unread,
Dec 23, 2003, 2:28:06 PM12/23/03
to
&'s are a quote character in xml, try:

<add key="Url" value="http://gisbox/mypage.htm?action=state&amp;city="/>

-- bruce (sqlwork.com)


" Jason Shohet" <ash...@hotmail.com> wrote in message
news:#S0tgdYy...@tk2msftngp13.phx.gbl...

vMike

unread,
Dec 23, 2003, 2:33:41 PM12/23/03
to
replace the "&" with "&amp;" without the quotes.


" Jason Shohet" <ash...@hotmail.com> wrote in message

news:%23S0tgdY...@tk2msftngp13.phx.gbl...

Hermit Dave

unread,
Dec 23, 2003, 2:39:44 PM12/23/03
to
replace the '&' with '&amp;'

you will be fine...

HTD

HD

" Jason Shohet" <ash...@hotmail.com> wrote in message
news:%23S0tgdY...@tk2msftngp13.phx.gbl...

Jim Cheshire [MSFT]

unread,
Dec 23, 2003, 2:47:22 PM12/23/03
to
Jason,

Try this instead:

<add key="Url" value="http://gisbox/mypage.htm?action=state&amp;city="/>

Any URLs that you put here must be URL encoded.


Jim Cheshire, MCSE, MCSD [MSFT]
Developer Support
ASP.NET
jame...@online.microsoft.com

This post is provided as-is with no warranties and confers no rights.

--------------------
>From: " Jason Shohet" <ash...@hotmail.com>
>Subject: can't put a url into the value of a key in appSettings
(web.config)
>Date: Tue, 23 Dec 2003 14:00:08 -0500
>Lines: 11
>X-Priority: 3
>X-MSMail-Priority: Normal
>X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
>Message-ID: <#S0tgdYy...@tk2msftngp13.phx.gbl>
>Newsgroups: microsoft.public.dotnet.framework.aspnet
>NNTP-Posting-Host: 222-234-234-66.cosmoweb.net 66.234.234.222
>Path:
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08
.phx.gbl!tk2msftngp13.phx.gbl
>Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.framework.aspnet:198029
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet

Jason Shohet

unread,
Dec 23, 2003, 3:47:42 PM12/23/03
to
You guys are great.
That did the trick.
Jason Shohet


0 new messages