Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Object reference not set to an instance of an object
Message
De
05/01/2010 11:06:18
 
 
À
05/01/2010 09:20:57
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01442124
Message ID:
01442154
Vues:
32
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...
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform