I am creating a javascript confirm message in my asp.net code:
deleteButton.Attributes.Add("onclick", "javascript:return confirm('Are you sure you want to delete client " + clientName + "')");
The problem here is that the client name can have apostrophes and other problematic characters.
Does anyone know a good, simple way to clean the variable "clientName" so that I can safely use it in the javascript?
Thanks!