Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Object reference not set to an instance of an object
Message
From
05/01/2010 11:06:18
 
 
To
05/01/2010 09:20:57
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
01442124
Message ID:
01442154
Views:
33
This kind of code is usually placed in a page that is tied to a Master Page, so you have to make sure that all that is wired up correctly. Your page will need to correctly point to its MasterPage so that the Content area will match up to the ContentPlaceholder in the MasterPage.

Here is a sample child page and you can see how it points to the MasterPage. Since your child page is in one folder your MasterPage may be in a different folder and you will need to make sure the path to the MasterPage is correct.
< % @ Page Language="C#"
         MasterPageFile="~/AceMaster.Master"
         AutoEventWireup="true"
         CodeBehind="AddDevice.aspx.cs"
         Inherits="Ace.DeviceEditPages.AddDevice" %>

<asp:Content ContentPlaceHolderID="head" runat="server">

</asp:Content>
>Dear Experts,
>
>I am creating a website in which I have created a MasterPage. The following statement works fine if if I use it one any page created in the same directory as masterpage
>
>asp:Content Id="Content4" ContentPlaceHolderID="Main" runat="server"
>
>But if I use the same line of code on any page made in a folder created inside the root of parent folder then it givevs the following error
>
>"Object reference not set to an instance of an object" You can see the snapshot of error attached.
>
>Please help.
>
>Thanks and Regards...
Previous
Reply
Map
View

Click here to load this message in the networking platform