Abraham Olatubosun

Abraham Olatubosun

  • NA
  • 471
  • 113k

Master Page not Showing Content Page

May 15 2017 6:26 PM
Dear code masters,
I havs a web application designed with asp:Masterpage with content page all works fine, i currently add another master page and disabled the previous one now i developed it with bootstrap but some content page didn't show when at run time even though i pointed all the content page  to the new master page.
 
 new masterpage html :
 
  1. <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="Admin_MasterPage" %>  
  2.   
  3. <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>  
  4.   
  5. <!DOCTYPE html>  
  6.   
  7. <html xmlns="http://www.w3.org/1999/xhtml">  
  8.   
  9. <head runat="server">  
  10.     <title>ECEWS LAEAVE APPLICATION</title>  
  11.   
  12.     <link href="Content/bootstrap.min.css" rel="stylesheet" type="text/css" />  
  13.     <%--<meta charset="utf-8" />  
  14.     <meta name="viewport" content="width=device-width, initial-scale=1" />--%>  
  15.     <asp:ContentPlaceHolder ID="head" runat="server">  
  16.     </asp:ContentPlaceHolder>  
  17. </head>  
  18. <body>  
  19.     <form id="form1" runat="server">  
  20.         <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>  
  21.         <div>  
  22.             <div class="banner navbar navbar-fixed-top navbar-default" role="banner">  
  23.                 <asp:Image ID="Image1" runat="server" Height="102px" ImageUrl="~/image/E_Leave_Logo.png" Width="68%" />  
  24.             </div>  
  25.   
  26.             <nav class=" navbar navbar-default navbar-fixed-top " style="margin-top: 100px;">  
  27.                 <div class="navbar-header">  
  28.                     <button type="button" class=" navbar-toggle" data-toggle="collapse" data-target="#tp">  
  29.                         <span class="icon-bar"></span>  
  30.                         <span class="icon-bar"></span>  
  31.                         <span class="icon-bar"></span>  
  32.                         <span class="icon-bar"></span>  
  33.                     </button>  
  34.   
  35.                 </div>  
  36.   
  37.                 <%--<div id="tp" class="navbar-collapse collapse">  
  38.                 <ul class="nav nav-tabs navbar-nav bg-success">  
  39.                     <li><a href="Default.aspx">Home</a></li>  
  40.                     <li class="dropdown">  
  41.                         <a href="#" class="dropdown-toggle" data-toggle="dropdown">Personnel <b class="caret"></b></a>  
  42.                         <ul class="dropdown-menu">  
  43.                             <li><a href="frmPersonnel.aspx">Personel Record</a></li>  
  44.                         </ul>  
  45.                     </li>  
  46.                 </ul>  
  47.             </div>--%>  
  48.              <div id="tp" class="navbar-collapse collapse ">  
  49.                     <ul class="nav navbar-nav nav-tabs  pull-right">  
  50.                         <li class="dropdown">  
  51.                             <a href="#" class="dropdown-toggle" data-toggle="dropdown">Personnel <b class="caret"></b></a>  
  52.                             <ul class="dropdown-menu">  
  53.                                 <li><a href="Admin/frmPersonnel.aspx">Personel Record</a></li>  
  54.                                 <li><a href="frmPensionAdmin.aspx">Pension Fund</a></li>  
  55.                                 <li class="divider"></li>  
  56.                                 <li><a href="Admin/frmApproveLeave.aspx">Leave Approval</a></li>  
  57.                                 <li><a href="Admin/frmLeavReport.aspx">Leave Report</a></li>  
  58.                             </ul>  
  59.   
  60.                         </li>  
  61.                         <li class="dropdown">  
  62.                             <a href="#" class="dropdown-toggle" data-toggle="dropdown">Entry Form <span class="caret"></span>  
  63.                                 <ul class="dropdown-menu">  
  64.                                     <li><a href="Personnel/frmLeavesheet.aspx">Leave Application</a></li>  
  65.                                     <li><a href="Personnel/Appraisal.aspx">Staff Performance</a></li>  
  66.                                 </ul>  
  67.                             </a>  
  68.                         </li>  
  69.                         <li class="dropdown">  
  70.                             <a href="#" class="dropdown-toggle" data-toggle="dropdown">Admin  <span class="caret"></span>  
  71.                                 <ul class="dropdown-menu">  
  72.                                     <li><a href="Admin/frmCreateUser.aspx">Create User </a></li>  
  73.                                     <li><a href="Admin/frmChangepass.aspx">Change Password</a></li>  
  74.                                 </ul>  
  75.                             </a>  
  76.                         </li>  
  77.                         <li><a href="#" class="glyphicon glyphicon-envelope">Contact</a></li>  
  78.                         <li><a href="#" class="glyphicon ">About Us</a></li>  
  79.                         <li><a href="#" class="glyphicon ">Login</a></li>  
  80.                     </ul>  
  81.   
  82.   
  83.                 </div>  
  84.                 
  85.   
  86.             </nav>  
  87.               
  88.                
  89.             <asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server">  
  90.             </asp:ContentPlaceHolder>  
  91.                
  92.             <footer class=" navbar navbar-fixed-bottom bg-success">  
  93.                 <p class="text-center">Copyright ©2016</p>  
  94.             </footer>  
  95.         </div>  
  96.     </form>  
  97.     <script src="Scripts/jquery-1.9.1.min.js" type="text/javascript"></script>  
  98.     <script src="Scripts/bootstrap.min.js" type="text/javascript"></script>  
  99. </body>  
  100. </html>  
while content page html :
  1. <%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" CodeFile="frmApproveLeave.aspx.cs" Inherits="Admin_frmApproveLeave" %>  
  2.   
  3. <asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">  
  4.     <style type="text/css">  
  5.   
  6.         .auto-style4 {  
  7.             width: 100%;  
  8.         }  
  9.         .auto-style6 {  
  10.             width: 364px;  
  11.         }  
  12.         .auto-style7 {  
  13.         width: 662px;  
  14.     }  
  15.     .auto-style5 {  
  16.         text-align: right;  
  17.     }  
  18.         .style1  
  19.         {  
  20.             width: 573px;  
  21.         }  
  22.         </style>  
  23. </asp:Content>  
  24. <asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">  
  25.        
  26.     <div style="margin-top:150px" class="row">  
  27.     <div class="col-sm-2"></div>  
  28.      <div class="col-sm-8">  
  29.                     <div class=" col-sm-12 bg-primary text-center">Leave Approval form</div>  
  30.                 <table class="table table-bordered auto-style4 table-condensed">  
  31.                      
  32.                     <tr  >  
  33.                         <td style="text-align: right"  >  
  34.                             <asp:Label ID="Label1" runat="server" Text="Employee ID :"></asp:Label>  
  35.                         </td>  
  36.                         <td  >  
  37.                             <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>  
  38.                            <%-- <asp:Button ID="btnFind" runat="server" OnClick="btnFind_Click" Text="Find" />--%>  
  39.                             <button type="submit" id="btnFind" runat="server" onserverclick="btnFind_Click" class="btn btn-warning">Find <b class="glyphicon glyphicon-search"></b></button>  
  40.                           <%--  <asp:Button ID="btnClear" runat="server" OnClick="btnClear_Click" Text="Clear All" />--%>  
  41.                             <button type="submit" id="btnClear" runat="server" onserverclick="btnClear_Click" class="btn btn-danger">Clear All <b class="glyphicon glyphicon-remove"></b></button>  
  42.                         </td>  
  43.                     </tr>  
  44.                     <tr  >  
  45.                         <td colspan="2"  >  
  46.                             <asp:GridView ID="GridView1" runat="server" AllowPaging="True"   
  47.                                 AutoGenerateColumns="False" BackColor="White" BorderColor="#E7E7FF"   
  48.                                 BorderStyle="Dotted" BorderWidth="1px" CellPadding="3" DataKeyNames="num" OnRowCommand="GridView1_RowCommand" OnPageIndexChanging ="GridView1_PageIndexChanging" Width="100%">  
  49.                                 <AlternatingRowStyle BackColor="#F7F7F7" />  
  50.                                 <Columns>  
  51.                                     <asp:BoundField DataField="employeeid" HeaderText="Employee ID" />  
  52.                                     <asp:BoundField DataField="startedate" DataFormatString="{0:d}" HeaderText="Start Date">  
  53.                                     <ItemStyle HorizontalAlign="Center" />  
  54.                                     </asp:BoundField>  
  55.                                     <asp:BoundField DataField="stopdate" DataFormatString="{0:d}" HeaderText="End Date">  
  56.                                     <ItemStyle HorizontalAlign="Center" />  
  57.                                     </asp:BoundField>  
  58.                                     <asp:BoundField DataField="nodays" HeaderText="No. of Days">  
  59.                                     <ItemStyle HorizontalAlign="Center" />  
  60.                                     </asp:BoundField>  
  61.                                     <asp:BoundField DataField="status" HeaderText="Status">  
  62.                                     <ItemStyle HorizontalAlign="Center" />  
  63.                                     </asp:BoundField>  
  64.                                     <asp:ButtonField CommandName="btnCmd" HeaderText="Select" Text="Select">  
  65.                                     <ItemStyle Font-Bold="True" Font-Italic="True" HorizontalAlign="Center" />  
  66.                                     </asp:ButtonField>  
  67.                                 </Columns>  
  68.                                 <EditRowStyle HorizontalAlign="Center" />  
  69.                                 <FooterStyle BackColor="#B5C7DE" ForeColor="#4A3C8C" />  
  70.                                 <HeaderStyle BackColor="#4A3C8C" Font-Bold="True" ForeColor="#F7F7F7" />  
  71.                                 <PagerSettings FirstPageText="First" LastPageText="Last" Mode="NextPreviousFirstLast" NextPageText="Next" PreviousPageText="Prev" />  
  72.                                 <PagerStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" HorizontalAlign="Right" />  
  73.                                 <RowStyle BackColor="#E7E7FF" ForeColor="#4A3C8C" />  
  74.                                 <SelectedRowStyle BackColor="#738A9C" Font-Bold="True" ForeColor="#F7F7F7" />  
  75.                                 <SortedAscendingCellStyle BackColor="#F4F4FD" />  
  76.                                 <SortedAscendingHeaderStyle BackColor="#5A4C9D" />  
  77.                                 <SortedDescendingCellStyle BackColor="#D8D8F0" />  
  78.                                 <SortedDescendingHeaderStyle BackColor="#3E3277" />  
  79.                             </asp:GridView>  
  80.                         </td>  
  81.                     </tr>  
  82.                       
  83.                     <tr  >  
  84.                         <td  >  
  85.                             <asp:Label ID="Label2" runat="server" Text="Employee ID :"></asp:Label>  
  86.                         </td>  
  87.                         <td  >  
  88.                             <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>  
  89.                         </td>  
  90.                     </tr>  
  91.                     <tr  >  
  92.                         <td  >  
  93.                             <asp:Label ID="Label3" runat="server" Text="Requested Days :"></asp:Label>  
  94.                         </td>  
  95.                         <td  >  
  96.                             <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>  
  97.                         </td>  
  98.                     </tr>  
  99.                     <tr  >  
  100.                         <td >  
  101.                             <asp:Label ID="Label4" runat="server" Text="Approved Days :"></asp:Label>  
  102.                         </td>  
  103.                         <td >  
  104.                             <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>  
  105.                                           
  106.                                     <asp:CheckBox ID="CheckBox1" runat="server" Text="Approved ?" TextAlign="Left" />  
  107.                         </td>  
  108.                     </tr>  
  109.                     <tr >  
  110.                         <td > </td>  
  111.                         <td  >  
  112.                             <%--<asp:Button ID="Button1" runat="server" Text="Submit and Approved " />--%>  
  113.                             <button type="submit" class="btn btn-success" id="btnSave" runat="server" onserverclick="btnSave_Click">Submit and Approved  <b class="glyphicon glyphicon-ok"></b></button>  
  114.                         </td>  
  115.                     </tr>  
  116.                      <tr >  
  117.                         <td > </td>  
  118.                         <td  >  
  119.                               
  120.                         </td>  
  121.                     </tr>  
  122.                      <tr >  
  123.                         <td > </td>  
  124.                         <td  >  
  125.                               
  126.                         </td>  
  127.                     </tr>  
  128.                 </table>  
  129.                 
  130.                 </div>  
  131.         </div>  
  132. </asp:Content>  
 This content page is not showing with the master page.
 
Kindly advice me on what i am doing wrong.
 
Thank you all 
 
 

Answers (7)