visaniom.blogg.se

Javascript download file dialog
Javascript download file dialog








javascript download file dialog

I had the requirement in my project to get the data from database and create an Excel file and insert the data and download the file to user machine. This technique is light weight on the page. You can use AJAX ( Scriptmanager + Updatepanel) to download the file from server, but you have to post back the page. (type, " scrHandlerStartUp", GetStartUpScript(), true) (type, " scrScripts", " Common/Loaders/LoadScripts.aspx") Protected void Page_Load( object sender, EventArgs e) ExcelFile.xls) when you submit an iframe. Then create form tag with one input control to pass filename (e.g. It will create an iframe dynamically and which has width, height and border as 0. Create FileHandler.js file to do the main work.(DescriptionAttribute)fi.GetCustomAttributes Public static string MIMETypeDescription(Enum mimeType)įieldInfo fi = mimeType.GetType().GetField(mimeType.ToString())










Javascript download file dialog