0
私はaspxページaspx.csページ内のdocument.getElementById(progressPanel.ID)を設定する方法
をからクライアントIDを渡していますfunction ShowProgressPanel(progresspanel)
{
var progressPanelId = document.getElementById(progressPanel.ID);
alert(progressPanelId);
if (progressPanelId != null)
{
var height = Math.min(document.documentElement.clientHeight, document.body.offsetHeight);
alert(height);
var width = Math.min(document.documentElement.clientWidth, document.body.offsetWidth);
var xPos = Math.round((width/2) - (progressPanelId.clientWidth/2));
var yPos = Math.round((height/2) - (progressPanelId.clientHeight/2));
setLocation(progressPanelId, { x: xPos, y: yPos });
}
function setLocation(element, point)
{
Sys.UI.DomElement.setLocation(element, point.x, point.y);
}
}
の下パネルとJavaScriptの場所を設定するJavaScriptが持っています
var progressPanel = document.getElementById('<%=_progressPanel.ClientID %>');
ShowProgressPanel(progressPanel);
私がaspx.csページから送信fine.whenのdiv tag.aboveコードをHTMLに設定されている作品はcontentplaceホルダー要素を示しており、高さが設定されていません。
string script = string.Format(@"ShowProgressPanel('{0}');", _progressPanel.ClientID);
ScriptManager.RegisterStartupScript(this, typeof(Page), _progressPanel.ID, script, true);
しかし、どちらの進捗パネルもcontetnplaceholderに配置されています。 aspx.csページでどうすればいいですか