I resolved this issue myself; Just in case anybody else runs into the same problem, I'll post it here...
I created a user control and a RadAjaxManager for Ajax support. The RadAjaxLoadingPanel was not showing up on Ajax operations. So I decided to manually show/hide the loading panel by using RadAjaxManager.ClientEvents. However, OnRequestStart and OnResponseEnd were not being triggered for some reason. So I hooked into the Sys.WebForms.PageRequestManager instance and added a listener for beginRequest and endRequest.
So I got that working and tried to show the RadAjaxLoadingPanel. That's when I realized the problem. RadAjax was trying to reference my user control client-side using ClientID. However, I inherit from System.Web.UI.UserControl which does not have a wrapper containing the control ClientID. So there was nothing to reference in the generated HTML. After wrapping my user control in a div with its ClientID, RadAjaxManager.ClientEvents began to throw the OnRequestStart and OnResponseEnd events correctly, and the RadAjaxLoadingPanel worked without additional coding on the client-side.
I don't know if this is the best way, but this is the code I used to resolve this issue:
Hope this helps!
I created a user control and a RadAjaxManager for Ajax support. The RadAjaxLoadingPanel was not showing up on Ajax operations. So I decided to manually show/hide the loading panel by using RadAjaxManager.ClientEvents. However, OnRequestStart and OnResponseEnd were not being triggered for some reason. So I hooked into the Sys.WebForms.PageRequestManager instance and added a listener for beginRequest and endRequest.
So I got that working and tried to show the RadAjaxLoadingPanel. That's when I realized the problem. RadAjax was trying to reference my user control client-side using ClientID. However, I inherit from System.Web.UI.UserControl which does not have a wrapper containing the control ClientID. So there was nothing to reference in the generated HTML. After wrapping my user control in a div with its ClientID, RadAjaxManager.ClientEvents began to throw the OnRequestStart and OnResponseEnd events correctly, and the RadAjaxLoadingPanel worked without additional coding on the client-side.
I don't know if this is the best way, but this is the code I used to resolve this issue:
Public Overrides Sub RenderControl(ByVal writer As System.Web.UI.HtmlTextWriter) |
writer.AddAttribute(HtmlTextWriterAttribute.Id, Me.ClientID) |
writer.RenderBeginTag(HtmlTextWriterTag.Div) |
MyBase.RenderControl(writer) |
writer.RenderEndTag() |
End Sub |
Hope this helps!