I have a link of a file, and I don't know how to add it to imagebutton. I want to see the 'open-save-cance开发者_开发问答l' , screen when imagebutton is clicked, but imagebutton doesn't seems to be taking the link of file as a file, but taking it as a page url and tring to open the file url as page.
Thanks
//OnClick server Handler
Response.Clear();
Response.AddHeader(
"content-disposition", string.Format("attachment; filename={0}", "file_name"));
Response.ContentType = "application/octet-stream";
Response.WriteFile("file_path");
Response.End();
精彩评论