RadAlert Doesn't Stick

2 posts, 0 answers
  1. Bill
    Bill avatar
    3 posts
    Member since:
    Jan 2011

    Posted 11 Oct 2013 Link to this post

    Below is my code, all of it.  When I click the button, the RadAlert only appears for an instant. Why?

    <%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm10.aspx.vb" Inherits="Easiest_Way.WebForm10" %>
      
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      
    <head runat="server">
        <title></title>
    </head>
    <body>
        <form id="form1" runat="server">
            <telerik:RadScriptManager ID="RadScriptManager1" Runat="server" />
            <telerik:RadWindowManager ID="RadWindowManager1" runat="server" />
            <div>
                <telerik:RadButton ID="RadButton1" runat="server" Text="RadButton" OnClientClicked="ClientClicked" />
            </div>
        </form>
    </body>
    <script type="text/javascript">
        function ClientClicked(sender, e) {
            radalert("Hi!");
            return false;
        }
    </script>
    </html>

     

  2. Marin Bratanov
    Admin
    Marin Bratanov avatar
    3595 posts

    Posted 14 Oct 2013 Link to this post

    Hi Bill,

    You need to prevent the postback from the button, because it disposes the RadAlert that was just shown, for example:
    <telerik:RadButton ID="RadButton1" runat="server" Text="RadButton" OnClientClicked="ClientClicked" AutoPostBack="false" />



    Regards,
    Marin Bratanov
    Telerik
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to the blog feed now.
  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top