Click here to Skip to main content
15,891,473 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
C#
<%@ Page Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="Menu.aspx.cs" Inherits="UserPanel.Menu" Title="Untitled Page" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
<style type="text/css">
    .modalBackground
    {
        background-color: Black;
        filter: alpha(opacity=90);
        opacity: 0.8;
    }
    .modalPopup
    {
        background-color: #FFFFFF;
        border-width: 3px;
        border-style: solid;
        border-color: black;
        padding-top: 10px;
        padding-left: 10px;
        width: 300px;
        height: 140px;
    }
</style>


  <asp:ScriptManager ID="ScriptManager1" runat="server"/>	          
                <div class="row">
                    <div class="col-md-12">
                        <h1 class="page-head-line">Menu</h1>
                        <h1 class="page-subhead-line">Select Your Menu !</h1>

                    </div>
                </div>
                
                <!-- /. ROW  -->
                <div class="row">
            
               <div class="panel panel-info">
                        <div class="panel-heading">
                           *You Can Place On Order at a Time !
                        </div>
                      
                        <div align="center">
<asp:LinkButton ID="LB_Sheesha"  runat="server">Order Normal Shesha <br />
 <asp:LinkButton ID="LB_Special" runat="server">Order Special Shesha
                        </div>
                      
      </div>
    <asp:Panel ID="Panel1" runat="server" visible=false  >
               
      <table>
      <tr>
      <td>
          <asp:Label ID="Label1" runat="server" Text="Label"> Select Flavour
      
      </td>      
      <td>
      
          <asp:DropDownList ID="Drop_nsheesha" runat="server">
          
          
      </td>      
     </tr></table>
     
    <asp:Button ID="B_Next" class="btn btn-info" runat="server" Text="Next" />
   <asp:Button ID="B_Cancel" class="btn btn-info" runat="server" Text="Cancel" /> 
                            
     
     </div>
     
    <asp:ModalPopupExtender ID="ModalPopupExtender2" runat="server"
      TargetControlID="LB_Sheesha" PopupControlID="Panel1" DropShadow="true" 
        OkControlID="B_Next"  CancelControlID = "B_Cancel" 
        OnOkScript="onOK()" BackgroundCssClass="modalBackground" 
        oncancelscript="Are You Sure ? " 
                      >
Posted
Updated 26-Oct-14 12:47pm
v2
Comments
Praveen_P 27-Oct-14 0:07am    
Try using Toolkit Script Manger instead of ScriptManager

change "Panel1" visible=false to style="display: none"

refer below article:
ASP.NET AJAX Control Toolkit ModalPopupExtender Control in Action[^]
 
Share this answer
 
v3
1.The tagprefix used by you in "@Register" directive should not be "asp", because "asp" is reserved for system ASPX controls.

2.It seems that you forgot to provide all ASPX code, because your "ModalPopupExtender" control is not closed properly.

3.You can find example about the correct using of the Modal Popup Extender in my next article: Advanced ASPX GridView Pagination and Data Entities[^]
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900