This is a migrated thread and some comments may be shown as answers.

Error using RadAlert with RadAjaxManger

2 Answers 156 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 2
James asked on 13 Nov 2008, 04:08 PM
I am getting an error when attempting to show a RadAlert in an Ajaxified control's Try/Catch block.
Here is the code from the page:
    <form id="form1" runat="server">  
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">  
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">  
            <telerik:AjaxSetting AjaxControlID="LinkButton1">  
                    <telerik:AjaxUpdatedControl ControlID="RadAjaxPanel1"   
                        LoadingPanelID="RadAjaxLoadingPanel1" /> 
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" Height="75px" 
        <img alt="Loading..." src='<%= RadAjaxLoadingPanel.GetWebResourceUrl(Page, "Telerik.Web.UI.Skins.Default.Ajax.loading.gif") %>' 
            style="border: 0px;" /> 
    <telerik:RadWindowManager ID="RadWindowManager1" runat="server">  
    <div id="left" style="float:left;width:200px">  
                    <asp:LinkButton ID="LinkButton1" runat="server">Test RadAlert in Ajax</asp:LinkButton> 
    <div id="content" style="float:left;width:800px">  
        <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" Height="200px" Width="800px">  
            <asp:Label ID="lblMessage" runat="server">Main Page</asp:Label> 
Here is the code behind for the button:
    Private Sub LinkButton1_Click(ByVal sender As ObjectByVal e As System.EventArgs) Handles LinkButton1.Click  
            Throw New Exception("Test of Rad Alert in Ajax")  
            Me.lblMessage.Text = "Label value changed on click of Link Button" 
        Catch ex As Exception  
            'Me.RadAjaxManager1.ResponseScripts.Add("radalert('" & ex.Message & "', 330, 210);")  
            'Me.RadAjaxManager1.ResponseScripts.Add("Sys.Application.add_load(function() { var f = function() { radalert('" & ex.Message & "', 330, 210, 'Test RadAlert'); Sys.Application.remove_load(f);};Sys.Application.add_load(f);})()")  
            Me.RadAjaxManager1.ResponseScripts.Add("(function(){var f = function() { radalert('" & ex.Message & "', 330, 210, 'Test RadAlert');Sys.Application.remove_load(f);}; Sys.Application.add_load(f);})()")  
        End Try 
    End Sub 
 As you can see I have tried several ways to show the RadAlert based on threads I found on the Telerik site.  I get the following error on the first attempt to show the RadAlert, i.e. the active code.
Error message dialog box:  htmlfile: Unspecified error
With the following code hightlighted.  The line that says "_46.SetActive();" is the line of code that is highlighted.

The second choice in the Catch from the codebehind produces this error: Microsoft JScript runtime error: Object expected.

The first choice produces the exact same error as the 3rd choice.

Thanks in advance for your help with this issue!

2 Answers, 1 is accepted

Sort by
Top achievements
Rank 2
answered on 17 Nov 2008, 03:53 PM
What is the normal response time for a forum post?

Svetlina Anati
Telerik team
answered on 18 Nov 2008, 09:58 AM
Hi James,

I tested the provided code with the mentioned version of RadControls - Q3 2008, namely 2008.3 1105 but I was not able to reproduce the problem. Please, examine the attached test demo, modify it in order to reproduce the problem, open a new support ticket and send it to me along with detailed reproduction instructions and explanation of the actual and the desired behavior.

As to your second question about the forum responses, they are intended to be used by the community and we do not guarantee a reply on time because support tickets have a higher priority. You can find more information about different support packages here:

the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Asked by
Top achievements
Rank 2
Answers by
Top achievements
Rank 2
Svetlina Anati
Telerik team
Share this question