or
<telerik:RadDropDownList ID="cmbPayment_CardType" runat="server" OnSelectedIndexChanged="cmbPayment_CardType_SelectedIndexChanged" Width="160px" DropDownHeight="90px" DropDownWidth="160px" />protected void Page_Load(object sender, EventArgs e){ try { if (!IsPostBack) { List<CreditCardListItem> lstCreditCards = null; //Load the list of accepted credit cards cmbPayment_CardType.Items.Clear(); lstCreditCards = GetCreditCardsList(); if ((lstCreditCards != null) && (lstCreditCards.Count > 0)) { foreach (CreditCardListItem ccDetails in lstCreditCards) cmbPayment_CardType.Items.Add(new DropDownListItem() { Text = ccDetails.DisplayName, Value = ccDetails.DisplayOrder.ToString() }); } lstCreditCards.Clear(); } } catch (Exception ex) { System.Diagnostics.Debug.Print("Error: " + ex.ToString()); }}This is the Javascript Function for the Alertfunction windowOnBeforeUnload() { if (window.event) window.event.returnValue = 'You will lose any unsaved changes!'; // IE else return 'You will lose any unsaved changes!'; // FX }This is the RadMenu HTML code<table class="takeActionTableContainer" cellpadding="1" cellspacing="0" style="margin: 0 auto;"> <tr> <td style="vertical-align:top; text-align:center; width:50%"> <telerik:RadMenu ID="RadMenuLibrary" runat="server" EnableRoundedCorners="true" EnableShadows="true" Skin="Default" EnableTextHTMLEncoding="true" Width="100%" style="z-index:10; position: relative; margin: 0; text-align:center;" DefaultClickToOpen="False" CollapseDelay="200" ExpandDelay="200" OnClientItemClicked="OnTakeActionItemClicked" OnClientItemClosed="windowOnBeforeUnload" OnClientMouseOut="windowOnBeforeUnload" > <ExpandAnimation Type="None" Duration="200" /> <CollapseAnimation Type="None" Duration="200" /> <Items> <telerik:RadMenuItem runat="server" Text="LIBRARY" PostBack="false" Width="100%"></telerik:RadMenuItem> </Items> </telerik:RadMenu> </td> <td style="vertical-align:top; text-align:center; width:50%"> <telerik:RadMenu ID="RadMenuCollaborator" runat="server" EnableRoundedCorners="true" EnableShadows="true" Skin="Default" EnableTextHTMLEncoding="true" Width="100%" style="z-index:10; position: relative; margin: 0; text-align:center;" DefaultClickToOpen="False" CollapseDelay="200" ExpandDelay="200" OnClientItemClicked="OnTakeActionItemClicked" > <ExpandAnimation Type="None" Duration="200" /> <CollapseAnimation Type="None" Duration="200" /> <Items> <telerik:RadMenuItem runat="server" Text="COLLABORATOR" PostBack="false" Width="100%"></telerik:RadMenuItem> </Items> </telerik:RadMenu> </td> </tr><asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" Runat="Server"> <link href="../Styles/Styles.css" rel="stylesheet" /> <script type="text/javascript"> function GetWindow(Token) { var radDash = $find("<%= radWindow.ClientID%>"); if (Token == 0) { radDash.setUrl("Request.aspx?Type=" + 0); } else if (Token > 0) { radDash.setUrl("Request.aspx?Type=" + Token); } radDash.set_modal(true); radDash.show(); } </script></asp:Content><asp:Content ID="Content2" ContentPlaceHolderID="BodyContent" Runat="Server"> <telerik:RadGrid ID="myRadGrid" runat="server" AutoGenerateColumns="false" Skin="Web20" Font-Size="10" OnNeedDataSource="myRadGrid_NeedDataSource"> <MasterTableView runat="server" DataKeyNames="intRequestId" CommandItemDisplay="Top"> <HeaderStyle HorizontalAlign="Center" /> <ItemStyle HorizontalAlign="Center" /> <AlternatingItemStyle HorizontalAlign="Center" BorderColor="#404040" /> <CommandItemStyle HorizontalAlign="Left" Height="25px" VerticalAlign="Middle" /> <CommandItemTemplate> <a href="#" id="Request" onclick="GetWindow(0);return false;">Request Token</a> </CommandItemTemplate> <Columns> <telerik:GridBoundColumn DataField="Name" HeaderText="NAME" /> </Columns> </MasterTableView> </telerik:RadGrid> <telerik:RadWindowManager ID="radWindow" runat="server" CenterIfModal="true" Width="800px" Height="450px" Modal="true" ShowContentDuringLoad="false" Skin="Web20" Behaviors="Close" VisibleStatusbar="false"> </telerik:RadWindowManager></asp:Content>