Hi,
Below is my javascript string which i will be using in asp.net
variable myname is having single quotes values (myname =John O'Loughlin
) .I get javascript error (Expected ';') when i register the script
any solution to assign value with variables having single quotes?
Thanks
Mpl
Below is my javascript string which i will be using in asp.net
Code:
sTemp = "<script language=javascript>;parent.document.getElementById('ctl00$ContentPlaceHolder1$txt_name').value ='" + myname + " ' ;</script>" ClientScript.RegisterStartupScript(Me.GetType, "myscript", sTemp)
variable myname is having single quotes values (myname =John O'Loughlin
) .I get javascript error (Expected ';') when i register the script
any solution to assign value with variables having single quotes?
Thanks
Mpl
Comment