Master Page not working on ASP.NET Page

Mar 2 2017 3:29 PM
I'm having trouble with my ASP.NET Webform. All my pages are working perfectly with the master page, I.e. Every time an item is clicked, it loads new information on the page without affecting the background (and menu, search bar, etc).  but for some reason my ProductItem page isn't accepting the master page. This occured after using a hyperlink to load specific info from the database. Heres my code for ProductItem:
 
BTW THE ASP>NET CODE IS CLUTTERED< you can find this code in the zip file uploaded code.zip.  
 
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ProductItem.aspx.cs" Inherits="mumsBoutique.ProductItem" %> ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server"> href="Content/websiteStyle.css" rel="stylesheet" type="text/css" />

Product Details

class="row"> ID="productNameLabel" runat="server" Text="Product"> /> ID="productItemNumber" runat="server" Text="ProductCode" CssClass="ProductItem_productNumber">

ID="productCost" runat="server" Text="£0.00">

ID="productImage" runat="server" />

Product summary

ID="productDescription" runat="server" Text="">

Buy Item

ID="ValidationSummary1" runat="server" CssClass="text-danger" />

Quantity: ID="itemQuantity" runat="server" Text="1"> ID="rfvItemQuantity" runat="server" ErrorMessage="Quantity is required" Text="Please specify the quantity required" ControlToValidate="itemQuantity" CssClass="text-danger" Display="Dynamic"> ID="cvItemQuantity" runat="server" ErrorMessage="Invalid quantity value" Text="Please specify a valid numeric quantity value" ControlToValidate="itemQuantity" Type="Integer" Display="Dynamic" CssClass="text-danger" Operator="DataTypeCheck"> ID="rvItemQuantity" runat="server" ErrorMessage="Invalid quantity value" Text="Please specify a quantity value between 1 and 10" ControlToValidate="itemQuantity" Type="Integer" MinimumValue="1" MaximumValue="10" Display="Dynamic" CssClass="text-danger">

ID="btnAddToBasket" runat="server" Text="Add to basket" CssClass="btn btn-primary btn-lg" OnClick="btnAddToBasket_Click" />

 
However, i do not think it originates from this productItem.aspx page, I believe it originates from the bag.aspx where the hyperlink is.
 
<%@ Page Title="Home Page" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="Bags.aspx.cs" Inherits="mumsBoutique.Bags" %> ID="BodyContent" ContentPlaceHolderID="MainContent" runat="server"> href="Content/mumsBoutique.css" rel="stylesheet" type="text/css" />

Bags

class="row"> ID="DataList1" runat="server" CssClass="table ProductsDataList" DataKeyField="productID" DataSourceID="SqlDataSource1" RepeatColumns="4" RepeatDirection="Horizontal"> <%# Eval("Picture", "~/{0}") %>' width="180px" height="200px"> /> <%# Eval ("productName") %>' runat="server" navigateurl='<%# Eval("productID", "ProductItem.aspx/{0}") %>'> /> Item Number: <%# Eval("productNumber") %>' runat="server"> /> <%# Eval("cost", "{0:C}") %>' runat="server"> /> /> /> $ ConnectionStrings:DefaultConnection %>" SelectCommand="SELECT Items.productID, Items.productName, Items.productNumber, Items.picture, Items.cost, Items.categoryID, ItemCategories.Name AS Expr1 FROM ItemCategories INNER JOIN Items ON ItemCategories.categoryID = Items.categoryID WHERE (Items.categoryID = 2)">
 
 
Can anyone see any reason why this problem occurs?
 
 
Best regards 
 

Attachment: code.zip

Answers (3)