Link to home
Start Free TrialLog in
Avatar of Relegence
RelegenceFlag for Israel

asked on

Sending foreign characters to a modalDialog using 'window.showModalDialog'

Hello,

I am writing a c# asp.net application in which i want to open a modal dialog and sent parameters to it.

var retVal = window.showModalDialog('EntitiesList.aspx?name=" + name, window, 'dialogWidth:220px;dialogHeight:200px,top=300,left=400,');

When my 'name' parameter contains foreign characters (for example, Montó or María), the value received at the destination page has a square (box) instead of the special letter.

How can i send the special characters to my destination page?

Thank you
Avatar of Meritor
Meritor
Flag of India image

Try following
var retVal = window.showModalDialog('EntitiesList.aspx?name=" + escape(name), window, 'dialogWidth:220px;dialogHeight:200px,top=300,left=400,');

Open in new window

Avatar of Relegence

ASKER

I tried 'escape' but it didn't help.
When i debug the application i see that i send the correct value, but in my cs page it is not received properly.

I am using:

name = Request["name"];
ASKER CERTIFIED SOLUTION
Avatar of Meritor
Meritor
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks a lot,
I used ISO-8859-1 and it works!