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 6233841
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:22:23+00:00 2026-05-24T10:22:23+00:00

I am using asp.net 4, .net 4 and masterpages. I added in the following

  • 0

I am using asp.net 4, .net 4 and masterpages. I added in the following code to my child page

    Private Sub FoodChain_Init(ByVal sender As Object, ByVal e As EventArgs) Handles Me.Init

    MyBase.OnInit(e)

    PopulateDropdowns()
    HideQuestionDiv()
    HideDropdowns()

End Sub

and ran my app. The app runs fine but when I went back to the design view I now get an error saying “object reference not set to an instance”. This is only during design time view and referencing the main place holder.

Is this a bug or am I missing something ? As I said the application runs fine and there are now issues during runtime.

  • 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-24T10:22:24+00:00Added an answer on May 24, 2026 at 10:22 am

    Try putting all your databinding inside the following. (sorry about the c# code). I think it is Me.DesignMode in VB.

    if (!this.DesignMode)
    {
    

    PopulateDropdowns();
    HideQuestionDiv();
    HideDropdowns();

    }
    

    I’m not sure if this works correctly for nested user controls but worth a try. Note that this won’t work inside a constructor, only other events.

    MSDN here.

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

Sidebar

Related Questions

Good day everyone, I am building a page in ASP.NET, and using Master Pages
I am using asp.NET with masterpages and usercontrols. In MasterPage: Doing <link href='<%=ResolveUrl(~/path/file.css)%>' rel=stylesheet
I am using VS2005 C# ASP.NET. I have a .aspx page with a script
I'm using webforms ASP.NET, with masterpages. I want to add a LANG attribute to
I am using Master Pages in an ASP.NET MVC app that lets you submit
I'm using a few (2 or 3) master pages in my ASP.NET MVC application
Using ASP.NET MVC there are situations (such as form submission) that may require a
Using asp.net, I need to generate a snapshot of an youtube video. I have
Using ASP.net 2.0, how do I present the information to the user similar to
Using ASP.net, how do you write ANSI characters to a text file? I need

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.