|
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FileDownloadUsingJavascript
{
public partial class FileHandler : System.Web.UI.Page
{
private const string APP_SCRIPTS = "appLoaderScripts";
protected void Page_Load(object sender, EventArgs e)
{
Type type = this.GetType();
if (!this.ClientScript.IsClientScriptIncludeRegistered(type, "scrScripts"))
this.ClientScript.RegisterClientScriptInclude(type, "scrScripts", "Common/Loaders/LoadScripts.aspx");
if (!this.ClientScript.IsStartupScriptRegistered(type, "scrHandlerStartUp"))
this.ClientScript.RegisterStartupScript(type, "scrHandlerStartUp", GetStartUpScript(), true);
}
private string GetStartUpScript()
{
return "try{{var handler = new FileHandler();handler.init();}}catch(e){{document.getElementById('divNotLoaded').style.display = '';}}";
}
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
I started development with Visual Basic 6.0 and then upgraded to Visual Studio .Net and working on .net for 7+ years now.