遮罩層_ModalPopupExtender

<cc2:ModalPopupExtender ID="MPE" runat="server" TargetControlID="BtnSearch2" BackgroundCssClass="modalBackground"
        PopupControlID="Panel3">        
  </cc2:ModalPopupExtender>

<asp:Panel ID="Panel3" runat="server" style="display:none;"  BackColor="White" Width="510px" >
                   <table style="width:510px">
                        <tr>
                             <td>
                               <asp:DropDownList ID="DDL" runat="server" Width="120px">
                                    <asp:ListItem Value="1" Text="Emp No"></asp:ListItem>
                                    <asp:ListItem Value="2" Text="Name"></asp:ListItem>
                                    <asp:ListItem Value="3" Text="Nt Name"></asp:ListItem>
                                    <asp:ListItem Value="4" Text="Dept Name"></asp:ListItem>
                                    <asp:ListItem Value="5" Text="Dept No"></asp:ListItem>
                                </asp:DropDownList>
                                <asp:TextBox ID="TxtAll" runat="server" Width="100px"></asp:TextBox>
                                <asp:Label ID="Label1" runat="server" Text="Plots Per Page"></asp:Label>
                                <asp:DropDownList ID="DDLPages" Width="60px" runat="server">
                                    <asp:ListItem Value="0" Text="10"></asp:ListItem>
                                    <asp:ListItem Value="1" Text="20"></asp:ListItem>
                                    <asp:ListItem Value="2" Text="30"></asp:ListItem>
                                    <asp:ListItem Value="3" Text="50"></asp:ListItem>
                                    <asp:ListItem Value="4" Text="100"></asp:ListItem>
                                </asp:DropDownList>
                            </td>
                            <td align="right">
                                <asp:UpdatePanel ID="UpdatePanel2" UpdateMode="Conditional" runat="server">
                                    <ContentTemplate>
                                        <asp:Button ID="BtnStartSearch" runat="server" Text="Search"  OnClick="BtnStartSearch_Click"  />
                                    </ContentTemplate>
                                </asp:UpdatePanel>
                            </td>
                        </tr>
                        <tr>
                            <td align="center" colspan="2">
                                <asp:UpdatePanel ID="UpdatePanel1" UpdateMode="Conditional" runat="server">
                                    <ContentTemplate>
                                    <cc1:TakakoGridView ID="GridView2" Width="500px" Height="300px"
                                    runat="server" AllowMultiColumnSorting="True" AllowPaging="True"
                                    AllowSorting="True" AutoGenerateColumns="False"
                                     onrowdatabound="GridView2_RowDataBound"
                                    BorderColor="#000066" BorderStyle="Solid" BorderWidth="1px" CellPadding="4"
                                    DataSourceID="ObjectDataSource2"  onrowcommand="GridView2_RowCommand"
                                    MouseOverColor="#C3D5FD"  TextOverColor="White"
                                    PageSize="10" PagingStyle="TextBox_GotoPage" Scrolling="Auto" 
                                    SortAscImageUrl="~/Images/ascending.gif"
                                    SortDescImageUrl="~/Images/descending.gif"  >
                                    <EmptyDataTemplate>
                                    <table width="480px" style="height:290px" >
                                    <tr align="center" valign="middle">
                                       <td>
                                            <a "font-size:large">No Data Found!</a>
                                       </td>
                                    </tr>
                                    </table>
                                    </EmptyDataTemplate>
                                <FrozenGridView FrozenColumnIndexes="0,1" IsFrozenHeader="true"
                                    KeepScrollState="true" />
                                <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                                <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
                                <EditRowStyle BackColor="#999999" />
                                <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
                                <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" HorizontalAlign="Center" />
                                <AlternatingRowStyle BackColor="White" ForeColor="#284775" />   
                                <Columns>
                                <asp:TemplateField>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="CheckBox1" runat="server" />
                                    </ItemTemplate>
                                </asp:TemplateField >
                                    <asp:BoundField DataField="emp_no" HeaderText="Emp No" SortExpression="emp_no"
                                       ReadOnly="True" > 
                                       <HeaderStyle Wrap="False" />
                                       <ItemStyle HorizontalAlign="Center" Width="60px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Emp_Name" HeaderText="Name" SortExpression="Emp_Name"
                                        ReadOnly="True">
                                        <HeaderStyle Wrap="False" />
                                        <ItemStyle Width="80px" />
                                    </asp:BoundField>
                                    <asp:BoundField DataField="Nt_Name" HeaderText="Nt Name">
                                        <HeaderStyle Wrap="False" />
                                        <ItemStyle Width="60px" />
                                    </asp:BoundField>
                                   <asp:BoundField DataField="Dept_Name" HeaderText="Dept Name">
                                        <HeaderStyle  Wrap="false" />
                                        <ItemStyle Width="200px" />
                                    </asp:BoundField>
                                     <asp:BoundField DataField="Dept_No" HeaderText="Dept No">
                                        <HeaderStyle  Wrap="false" />
                                        <ItemStyle Width="100px" />
                                    </asp:BoundField>
                                </Columns>
                                </cc1:TakakoGridView>
                                 <asp:ObjectDataSource ID="ObjectDataSource2" runat="server"
                                    TypeName="MM002Factory"
                                    SelectMethod="GetDateTable1"
                                    SelectCountMethod="GetDataTableCount1"
                                    StartRowIndexParameterName="startRowIndex1"
                                    MaximumRowsParameterName="maxinumRows1" 
                                    EnablePaging="true">
                                    <SelectParameters>
                                        <asp:Parameter Name="DDL" />
                                        <asp:Parameter Name="ALL" />
                                    </SelectParameters>
                                </asp:ObjectDataSource>
                                </ContentTemplate>
                                </asp:UpdatePanel>
                             </td>
                          </tr>
                        <tr>
                            <td align="left">
                                <asp:Label ID="Label2" runat="server" Text="Data can only select the current page"></asp:Label>
                            </td>
                            <td  align="right">
                               <asp:Button ID="Button1" runat="server" Text="Return" OnClick="PopBtnSave_Click"/>
                            </td>
                        </tr>
                </table>
    </asp:Panel>


.modalBackground
{   background-color:Gray;
    filter:alpha(opacity=70);
    opacity:0.7;
}

posted on 2011-04-07 16:10  pramezh  阅读(203)  评论(0编辑  收藏  举报