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

RadAlert Doesn't Stick

1 Answer 46 Views
Window
This is a migrated thread and some comments may be shown as answers.
Bill
Top achievements
Rank 1
Bill asked on 11 Oct 2013, 04:16 PM

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>

 

1 Answer, 1 is accepted

Sort by
0
Marin Bratanov
Telerik team
answered on 14 Oct 2013, 01:03 PM
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.
Tags
Window
Asked by
Bill
Top achievements
Rank 1
Answers by
Marin Bratanov
Telerik team
Share this question
or