QueryString Problems
-
Hi everybody... I have some problems related to a querystring issue. I`m calling an ASPX page, with some querystring parameters, from a JavaScript function, through the window.open method. The way this URL is configured and called in the javascript function is the following: EnviarMapaEmail.aspx?type=addPt&x=-46.644203856241546&y=-23.571182563934798&st=Av.%20Paulista&nb=10&city=S%C3O%20PAULO&uf=SP&POI= And in the ASPX page, the Request.QueryString comes this way: type=addPt&x=-46.644203856241546&y=-23.571182563934798&st=Av.+Paulista&nb=10&city=SO+PAULO&uf=SP&POI= The problem is: the original city name (city parameter) is 'SÃO PAULO' and it`s encoded in the URL (thought the escape() javascript function) as 'S%C3O%20PAULO', but my ASPX page only recognize'SO+PAULO' and it goes back through the Request.QueryString as 'SO PAULO'. What`s the problem in encoding especial chars? Any hint would be very appreciated... :] See you!
-
Hi everybody... I have some problems related to a querystring issue. I`m calling an ASPX page, with some querystring parameters, from a JavaScript function, through the window.open method. The way this URL is configured and called in the javascript function is the following: EnviarMapaEmail.aspx?type=addPt&x=-46.644203856241546&y=-23.571182563934798&st=Av.%20Paulista&nb=10&city=S%C3O%20PAULO&uf=SP&POI= And in the ASPX page, the Request.QueryString comes this way: type=addPt&x=-46.644203856241546&y=-23.571182563934798&st=Av.+Paulista&nb=10&city=SO+PAULO&uf=SP&POI= The problem is: the original city name (city parameter) is 'SÃO PAULO' and it`s encoded in the URL (thought the escape() javascript function) as 'S%C3O%20PAULO', but my ASPX page only recognize'SO+PAULO' and it goes back through the Request.QueryString as 'SO PAULO'. What`s the problem in encoding especial chars? Any hint would be very appreciated... :] See you!
AFAIK, the settings that decide how the escaped codes in the request are decoded are: :: The content-type setting in the html header, which probably comes from: :: The content-type meta tag in the sending page. :: The RequestEncoding setting in the web.config file. Also, the
escape
function might not take into account the selected encoding for the page. Try the newerencodeURIComponent
function instead.--- single minded; short sighted; long gone;
-
AFAIK, the settings that decide how the escaped codes in the request are decoded are: :: The content-type setting in the html header, which probably comes from: :: The content-type meta tag in the sending page. :: The RequestEncoding setting in the web.config file. Also, the
escape
function might not take into account the selected encoding for the page. Try the newerencodeURIComponent
function instead.--- single minded; short sighted; long gone;