I am calling JavaScript function which has two parameter. Everything working fine, but when any parameter having single invited comma its not working. I have tried to replace it with \' but still not working. My codes are.
Server Side :
string param1 = "IFES";
string param2 = "IFES Chapter's Introduction";
string str = param2.Replace("'","\'");
btnShow.Attributes.Add("onclick","ShowDetails('" + param1 + "','" + str + "')");
JavaScript Code:
function ShowDetails(prm1,prm2){
// My code here
}