You can only access the ProgressTemplate of the UpdateProgress control very late in the page's lifecycle. Trying to access it from Page_Load, Page_Init, or Page_PreRender will result in an error. Access it from the Page_PagePreRenderComplete event.
VB.NET:
Protected Sub Page_PreRenderComplete(ByVal senderAs Object,ByVal eAs System.EventArgs)Handles Me.PreRenderCompleteCType(UpdateProgress1.FindControl("PgbDataGrid"), UserControl).Attributes.Add("style","top:200px; left:200px;")End Subor Client-side/Javascript:
var uc = document.getElementById('<%= PgbDataGrid.ClientID %>');
uc.style.top = '200px';uc.style.left = '200px';
No comments:
Post a Comment