sly_Chandan
sly_Chandan

Reputation: 3515

What is the escape sequence for & in string literals in web.config?

What is the escape sequence for &-sign in string literals in web.config?

Upvotes: 21

Views: 30004

Answers (3)

SHO
SHO

Reputation: 19

I'm afraid the & doesn't work in web.config, it must have stricter rules than normal XML:

<add key="ST_CF_AppType_ipad" value="http://itunes.apple.com/se/app/itunes-u/id490217893?l=en&amp;mt=8" />

Gives an error occurred while parsing EntityName.

Upvotes: 0

shahkalpesh
shahkalpesh

Reputation: 33474

& -> &amp;

here: What characters do I need to escape in XML documents?

Upvotes: 38

dogbane
dogbane

Reputation: 274622

Use "&amp;" instead of "&".

Upvotes: 6

Related Questions