473,466 Members | 1,457 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

failed to load in the web form designer...

I have web pages that inherit from a custom page class. I now get the
following error:

"The file failed to load in the web form designer. ... Object
reference not set to an instance of an object."

This occured after I added the following line of code in the base
class constructor:

if(User.Identity.Name.Length > 0)

Any way around this?

Thanks for your help.
Nov 17 '05 #1
1 1480
As a guess, it looks like the constructor is executed when the form designer
loads? And at design time, that expression can't be evaluated, because User
is not set to anything.

My recommendation would be to put that code into Page_Init or Page_Load.

"Jona Kee" <jk**@jonawerks.com> wrote in message
news:da**************************@posting.google.c om...
I have web pages that inherit from a custom page class. I now get the
following error:

"The file failed to load in the web form designer. ... Object
reference not set to an instance of an object."

This occured after I added the following line of code in the base
class constructor:

if(User.Identity.Name.Length > 0)

Any way around this?

Thanks for your help.

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: jamesa | last post by:
I am a beginner and trying my first C# application. Any reason why I am getting the message Login failed for user 'admin' I have thoroughly checked the security settings in the sql server. Find...
0
by: | last post by:
I added a reference to my web project but, when I try to view my page design, I get the error: "The file failed to load in the Web Form Designer". The designer could not be shown for this file...
9
by: John Kirksey | last post by:
I have a page that uses an in-place editable DataGrid that supports sorting and paging. EnableViewState is turned ON. At the top of the page are several search fields that allow the user to filter...
1
by: vireemani | last post by:
Hi all, I have a form with some server controls on it. I changed text box ID's and compiled the solution. I got an error message saying type or namespace name "txtEmrgcyContactName" could not be...
1
by: fl | last post by:
I am running ASPNET on my local machine. I have a problem when I try to connect to a SQL server database table. The data looks good when I right click SqlDataAdapter1 to preview the data. When F5...
5
by: ALthePal | last post by:
Hi, I am receiving this message when I start up VS.NET 1.0 on WinXP, File Failed to load in WEb Form designer. Please correct the following error, then load it again: Exception from...
2
by: Jeff_Mac | last post by:
Hi there. I'm a bit of a newbie, and I would appreciate any help that anyone can give me on an error I'm getting with Crystal Reports. Every time I attempt to view a report using the Crystal...
1
by: Don | last post by:
I'm getting the following exception displayed in the task list at design time for my project: "Code generation for property 'Controls' failed. Error was: 'Object reference not set to an...
0
by: nmaddock | last post by:
Hi Guys, seen this example on msdn, how can i remove the invalide nodes and elements when they fail against the schema and then save to a new xml document. any help would be great my code is...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.