RadAlert does nothing?

3 posts, 0 answers
  1. Rob Ainscough
    Rob Ainscough avatar
    262 posts
    Member since:
    Jan 2010

    Posted 21 Sep 2018 Link to this post

    I've search thru all the thread regarding RadAlert not working and I still can't figure out why I get nothing at all, no errors in code, no exceptions triggered, nothing.

    Here is my code:

    <telerik:RadScriptManager ID="rsmLogin" runat="server" EnableHandlerDetection="false" EnableScriptCombine="false"></telerik:RadScriptManager>
    <telerik:RadSkinManager ID="rskmLogin" runat="server" Skin="Default"></telerik:RadSkinManager>
    <telerik:RadInputManager ID="rimLogin" runat="server"></telerik:RadInputManager>
    <telerik:RadWindowManager ID="rwmLogin" runat="server" EnableShadow="true"></telerik:RadWindowManager>
    <script type="text/javascript">
        function callBackFn(arg)
            alert("this is the client-side callback function. The RadAlert returned: " + arg);
    <telerik:RadPageLayout ID="rpl_Login" runat="server" GridType="Fluid" Width="248px" Style="margin:2px; align-content:center;">
            <telerik:LayoutRow style="height:42px; margin-top:8px">
                    <telerik:LayoutColumn style="text-align:center; align-content:center">
                        <telerik:RadButton ID="rbn_SignIn" runat="server" Text="SIGN IN" Font-Size="Large" Width="100"></telerik:RadButton>


    and code behind 

    Private Sub rbn_SignIn_Click(sender As Object, e As EventArgs) Handles rbn_SignIn.Click
                Me.rwmLogin.RadAlert("We're sorry, but we could not locate your account based on the credentials provided.", 500, 200, "Login Error", "callBackFn")
        Catch ex As Exception
            Dim ErrorLog As New DC.Errors.Log(ex)
        End Try
    End Sub


    I also tried without the callBackFn which was pulled direction from your documentation sample.

    Any suggestions?

    Cheers, Rob.


  2. Marin Bratanov
    Marin Bratanov avatar
    5331 posts

    Posted 21 Sep 2018 Link to this post

    Hi Rob,

    The problem with this snippet is in the apostrophe in the server code that terminates the JavaScript string too early and causes exceptions on the client side that you can monitor in the browser console. The solution is to escape it: https://docs.telerik.com/devtools/aspnet-ajax/controls/window/troubleshooting/calling-the-predefined-dialogs-from-the-server-methods.

    Marin Bratanov
    Progress Telerik
    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  3. Rob Ainscough
    Rob Ainscough avatar
    262 posts
    Member since:
    Jan 2010

    Posted 21 Sep 2018 in reply to Marin Bratanov Link to this post

    Oh my goodness, you are correct, sorry I missed that apostrophe.  Working well now.

    Cheers, Rob.

Back to Top