Solved

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

Posted on 2008-06-15
4
506 Views
Last Modified: 2008-07-03
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
0
Comment
Question by:Relegence
  • 2
  • 2
4 Comments
 
LVL 4

Expert Comment

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

Open in new window

0
 

Author Comment

by:Relegence
ID: 21787936
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"];
0
 
LVL 4

Accepted Solution

by:
Meritor earned 400 total points
ID: 21787950
I am not familier with ASP,
but try to set proper endocing while sending response for that,
try using ISO-8859-1 or ISO-8859-2 instead of UTF-8 (the defult one, I guess).
0
 

Author Comment

by:Relegence
ID: 21787956
Thanks a lot,
I used ISO-8859-1 and it works!
0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
This article discusses how to create an extensible mechanism for linked drop downs.
This video teaches users how to migrate an existing Wordpress website to a new domain.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question