Torna al Thread

protected override void OnPreRender(EventArgs e) { if (!this.Page.ClientScript.IsClientScriptBlockRegistered("showLoading")) { string function = @" function showLoading() { var width = document.body.offsetWidth; var height = document.body.offsetHeight; var top = 0; var left = 0; var pnlLoading = document.getElementById('" + pnlLoading.ClientID + @"'); pnlLoading.style.width = width + 'px'; pnlLoading.style.height = height + 'px'; pnlLoading.style.top = top + 'px'; pnlLoading.style.left = left + 'px'; pnlLoading.style.visibility = 'visible'; pnlLoading.style.cursor = 'wait'; var imgLoading = document.getElementById('" + imgLoading.ClientID + @"'); imgLoading.style.left = ((width - 130) / 2) + 'px'; imgLoading.style.top = '150px'; imgLoading.style.visibility = 'visible'; var selects = document.getElementsByTagName('select'); for (i = 0; i < selects.length; i++) selects[i].style.visibility = 'hidden'; }"; this.Page.ClientScript.RegisterClientScriptBlock(this.Page.GetType(), "showLoading", function, true); } this.Page.Form.Attributes.Add("onsubmit", "showLoading();"); base.OnPreRender(e); }
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5