I am using javascript to open save dialog box
the java script is
function openDialog(path) {
document.execCommand("SaveAs",true,path);
}
In my project, i am creating linkButtons dynamically and attaching this function with linkButton's OnClient Click event at run time.
LinkButton linkButton = new LinkButton();
linkButton.OnClientClick = "openDialog("+file.ToString()+")";
where "file" contains the path of the file which has to be saved.
But i am getting a javascript error as
"Expected ")" "
can anyone help me in what i am doing wrong in this.
I have N number of dynamically created linkButtons and i am associating each linkButton with different file.