Last post Jan 25, 2006 04:37 AM by TMJP
Jan 17, 2006 07:16 AM|TMJP|LINK
I'm currently trying to integrate 1 site to another. This takes the form of an HTML form POST ing to an ASP.NET page.
The problem I have is that I need to post UK Currency Pound Signs (£ / £ depending on how this post will be displayed).
For some reason, these symbols are being lost when the .net page gets hold of the posted variable. I can't work out why.
I have written a demo of this page. The page contains 2 forms, the first posts to an asp page, which correctly gets the £ sign, the second form posts to a .net page, which does not get the £ sign.
Link to a demo of this page
I'm not sure where to start here, so if anyone has any hints I'd be dead grateful.
Jan 24, 2006 01:51 PM|SimonCal|LINK
Hi Toby, in what way are you saying the data is lost, I did not see this explicitly in your example? If the entity &pound; is entered in a textbox for example, displaying this in the response yields the pound
symbol as interpreted by the browser. Are you html decoding the form data?
Jan 25, 2006 04:37 AM|TMJP|LINK
Thanks for getting back to me. I've actually fixed the problem. It was down to the default character set not including a £ sign. I've placed the following code into my web.config inside the system.web
<globalization fileEncoding="iso-8859-15" requestEncoding="iso-8859-15" responseEncoding="iso-8859-15" culture="en-GB" />
As a result, my example now works successfully. Previously however, the £ sign in the input box was not ignored by the response page.