I have a javascript method that checks the following condition
method(selection1,selection2)
{
if(selection1=="yes")
{
//Do something
}
if(selection2=="yes")
{
//Do something
}
}
now i pass arguments from code behind like this
ClientScript.RegisterStartupScript(GetType(), "id", "method('" + selection1 + "," + "'" + selection2 + "')", true);
Here selection is a string variable
string selection1="Yes"
But the desired functionality doesn't work out. I know the javascript is correct because when i use hardcoded arguments then the javascript runs.
Kindly help. Thanks