Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to have &/& in web.config file

i m passing URl from web config where i need to write
Example :: URL=http://www.google.co.in/search?hl=en&rlz=1R2SKPB_enIN332&ei=yktESuLfIIbg7APpquQj&sa=X&spell=1

if i write this url in web.config file i m getting in valid URL.

How to go about it?

like image 659
jyoti Avatar asked Jun 26 '09 05:06

jyoti


1 Answers

Make sure it is written using proper Xml encoding (which, amont other things, will replace all '&' characters with '&').

This should work well:

<add key="uri" value="http://www.google.co.in/search?hl=en&amp;rlz=1R2SKPB_enIN332&amp;ei=yktESuLfIIbg7APpquQj&amp;sa=X&amp;spell=1" />
like image 199
Fredrik Mörk Avatar answered Sep 18 '22 05:09

Fredrik Mörk