I am trying to create a simple JavaScript file to inject from code behind and want to append variables names to message.
string javascript = string.Format ( @"var msg = '{0} '; if(confirm(msg)) { hdnfield.value='Yes'; } else { hdnfield.value='No'; } submit();", variableName); but getting an FormatException. What is the right way to do this?
Thanks as always.