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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:33:26+00:00 2026-06-14T00:33:26+00:00

I have an error displayed regarding onload event. The error is only displayed when

  • 0

I have an error displayed regarding onload event. The error is only displayed when I add the control to a form and try to view the form in design view. Looking at the control itself in design view it’s fine. The error is

Object reference not set to an instance of an object.

Stack Trace

at BHCS.ECC.PhysDoc.UI.UserControls.TemplateBaseControl.SetControlVisibility() in C:\TFS10\ECC\Dev\BHCS\ECC\BHCS.ECC\BHCS.ECC\PhysDoc\UI\TemplateBaseControl.cs:line 98
at BHCS.ECC.PhysDoc.UI.UserControls.TemplateBaseControl.ucTemplateBase_Load(Object sender, EventArgs e) in C:\TFS10\ECC\Dev\BHCS\ECC\BHCS.ECC\BHCS.ECC\PhysDoc\UI\TemplateBaseControl.cs:line 476
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.UserControl.OnLoad(EventArgs e)
at DevExpress.XtraEditors.XtraUserControl.OnLoad(EventArgs e)
at BHCS.ECC.PhysDoc.UI.UserControls.TemplateBaseControl.OnLoad(EventArgs e) in C:\TFS10\ECC\Dev\BHCS\ECC\BHCS.ECC\BHCS.ECC\PhysDoc\UI\TemplateBaseControl.cs:line 1029
at System.Windows.Forms.UserControl.OnCreateControl()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl()
at System.Windows.Forms.Control.ControlCollection.Add(Control value)
at System.Windows.Forms.Form.ControlCollection.Add(Control value)
at System.Windows.Forms.Design.ControlDesigner.DesignerControlCollection.Add(Control c) 

Having objects at design time doesn’t make any sense. Why do I have code running in my Form? What is not allowed in the control that causes the error in the form design view?

  • 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-06-14T00:33:27+00:00Added an answer on June 14, 2026 at 12:33 am

    The error is thrown here:

    BHCS.ECC.PhysDoc.UI.UserControls.TemplateBaseControl.SetControlVisibility() in C:\TFS10\ECC\Dev\BHCS\ECC\BHCS.ECC\BHCS.ECC\PhysDoc\UI\TemplateBaseControl.cs:line 98
    

    You need to look at that line to determine why you’re getting Object reference not set to an instance of an object..

    The reason you’re getting this error in design time when you try to view the form designer is that VS needs to execute your custom control to display it. If there is an error in the code for your custom control, VS can’t show anything, and hence reports the error.

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

Sidebar

Related Questions

I have a very strange issue regarding only IE8 + Windows Vista, the error
I have a script. If call from cmd console, the error is displayed. However
I have referred this for creating error message tool tips, to be displayed continuously
I have a multi-lingual page where I want to display form validation error in
Is it possible to add an error for input via ModelState.AddModelError(inputId) to have error
I have got the following problem. I encountered an error regarding the default parameters.
I have a problem regarding a query where i want to only display data
Regarding Uploadify Hello, Currently I have a PHP only upload script and I'm planning
I have question regarding redirection in Grails web-flow. I am in a view state
I have a TextView that displays an error message in the login page of

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.