Hi,
I'm a beginner with javascript and asp net, i work with visual studio 2005.
I have a javascript function who add a value in a listbox:
function
ListAddItem(listBoxId, value)
{
...
}
This function is on a parent page and on this page i have several links.
when i click on a link a child page opens, on this page there are some text box, i enter some string and when i click the button
i call the opener.ListAddItem
script +=
"opener.ListAddItem('list1", '" + Value + "');";
that work of course, but there is a problem if i enter some string who contains some ' !!!
Ok before to call the function javascript i use string.replace("'","''"); in c sharp !
but that doesn't work because when i execute the code and enter a string with a ', the ' is well double '' but now my function fails because he think there are 3 parameter and not 2!!!
Have you got any idea ?
Thanks in advance
Christophe