Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error Processing Master File

Status
Not open for further replies.

rhnewfie

Programmer
Jun 14, 2001
267
CA
I am getting an error in my web application, it states that it cannot process my master file because the code directory has not yet been built. Anyone have any ideas? I am quite the newbie at this!

Oh, also, I created a Default.aspx and selected my master file, then removed the masterfile reference and added it to the web.config file. Now my asp: tags are not recognixed in Default.aspx


<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Title="JB" %>

<asp:Content ID="Content1" ContentPlaceHolderID="RightContent" runat="server">
</asp:Content>
<asp:Content ID="MainContent" ContentPlaceHolderID="MainContent" runat="server">
<asp:Image ID="img" runat="server"
ImageUrl="~/Images/image.jpg"
ImageAlign="left"/>

Now I can put some rather interesting text in here

</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="LeftContent" runat="server">
</asp:Content>
 
Hi,

If you're trying to add a masterpage to a webform then include this in the webform header

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Title="JB" MasterPageFile="~/yourmasterpagename.master" %>

Upon creation, if you placed your MasterPage code in a separate file (yourmasterpagefilename.master.cs) then make sure this is at the top of your Masterpage header.

<%@ Master Language="C#" Inherits="master" CodeFile="yourmasterpagefilename.master.cs" %>

Don't know if this will help. Don't even know what you're asking. Next time try posting the exact error from the developer host (assuming you're using Microsoft Web dev 2k5, WebMatrix or VS 2k3/2k5)

Cheerzs
 
Basically I restarted this project, did everything the same (or so I think) and it works fine for some reason... wierd.

Although content pages display correctly in IE but give errors in the design view... sigh
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top