c# - Outlook changes & to & -


i habe asp website, , want send email using template. in template have 2 placeholders inside <a href=""> (%code% , %email%) supposed query strings

it looks kinda

<a href="http://www.foo.com?qs1=example&code=%code%&email=%email%" />

i use .replacement() method replace 2 fields.

the problem after receiving email, & characters replaced &amp; , the query string becomes invalid.

i don't know if outlook problem (2013) or if can fixed within code.

thanks

ampersands aren't valid in context.

if "encode" them before outlook can.. switch normal you:

<a href="http://www.foo.com?qs1=example&amp;code=%code%&amp;email=%email%" /> 

so you use amp;, , outlook fix it. browsers same thing.

even if doesn't in page source.. if click link amp; replaced normal ampersand.


Comments

Popular posts from this blog

android - getbluetoothservice() called with no bluetoothmanagercallback -

sql - ASP.NET SqlDataSource, like on SelectCommand -

ios - Undefined symbols for architecture armv7: "_OBJC_CLASS_$_SSZipArchive" -