Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 881513
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T12:16:25+00:00 2026-05-15T12:16:25+00:00

Someone can explain this error? Error Creating Control – head Object reference not set

  • 0

Someone can explain this error?

Error Creating Control – head
Object reference not set to an instance of an object.

<%@ Page Title="" Language="C#" MasterPageFile="~/Controls/Master1.Master"
 AutoEventWireup="true" CodeBehind="GrupoUsuario.aspx.cs" Inherits="GrupoUsuario" %>

<asp:Content ID="Content1" runat="server" contentplaceholderid="head">
</asp:Content>

I Think this is a bug of visual studio 2010 in design view. I’not using any event to manipulate session object in the method OnInt(). The “PlaceHolderTopo” is an placeholder in the web user control Topo.ascx. It’s work normaly. I Don’t have any code inside the content place holder in the page tha inherits from the master page and get this error.

Below is the code of the masterpage:

<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="PrincipalSeguranca.Master.cs" Inherits="PrincipalSeguranca" %>
<%@ Register Src="Topo.ascx" TagName="Topo" TagPrefix="uc1" %>
<%@ Register src="MenuAdmin.ascx" TagName="MenuAdmin" TagPrefix="uc2" %>
<%@ Register src="Rodape.ascx" tagname="Rodape" tagprefix="uc3" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
  <title>Sistema</title>
  <script language="jscript" type="text/javascript" src="Scripts/Geral.js"></script>
  <link rel="shortcut icon" href="../layout/ico/favicon.ico" type="image/x-icon" />
  <link rel="stylesheet" href="../layout/css/styles.css" type="text/css" />
  <link href="../layout/css/menu_tabbed.css" rel="stylesheet" type="text/css" />
  <link rel="stylesheet" href="../layout/css/contents.css" type="text/css" />
</head>

<body>

  <form id="form1" ClientInstanceName="form1" runat="server">
    <uc1:Topo ID="Topo1" runat="server" />
    <div id="corpo">
      <asp:ContentPlaceHolder ID="head" runat="server">
      </asp:ContentPlaceHolder>
    </div>
    <div id="rodape">
      <uc3:Rodape ID="Rodape1" runat="server" />
    </div>
  </form>  
</body>
</html>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T12:16:26+00:00Added an answer on May 15, 2026 at 12:16 pm

    You have a bug in your Rodape control at design time.

    When you open your page in Design view, it creates an instance of your custom control in Visual Studio’s process. Since your website is not actually running, the code in your control is probably accessing some static member which hasn’t been initialized.

    You should launch a second copy of Visual Studio, attach its debugger to the first copy, set Break on All Exceptions from the Debug menu, and find your bug.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 502k
  • Answers 502k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I figured it out. The server that I'm working on… May 16, 2026 at 2:38 pm
  • Editorial Team
    Editorial Team added an answer Well, I am doing exactly this in my product: have… May 16, 2026 at 2:38 pm
  • Editorial Team
    Editorial Team added an answer You could try using something like this: int xValue =… May 16, 2026 at 2:38 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

Can someone explain why this script throws an exception? $byteArray = @(1,2,3) write-Output (
Can someone look at the linked reference and explain to me the precise statements
$('#myTable').click(function(e) { var clicked = $(e.target); clicked.css('background', 'red'); }); Can someone explain this to
I stumbled upon an interesting error that I've never seen before, and can't explain
Please could someone give me a few tips for creating function pointers for MS
I'm creating a social network in Rails and I have a model like this:
I am not able to understand why this code doesn't compile: class A {
I have seen an HTML code like this for the ID attribute: id="t1:c3" Can
( Note : I'm using Scala 2.7.7 here, not 2.8). I'm doing something pretty
I'm creating a code that gets image's urls from any web pages, the code

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.