Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / September 2007

Tip: Looking for answers? Try searching our database.

compositecontrol: design time error creating control, nullreference exception

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Boot2TheHead - 06 Sep 2007 19:11 GMT
I've created a composite control that uses 6 textboxes and 2 buttons.
The control works fine, but the design time is frequently goofed up.
I've never gotten the thing to render in design time but it has always
rendered it's properties and events to the properties window. Now I'm
not even getting that. I opened it up this morning and added 3
properties and made a small change to the html render method. This
stuff is frustrating because there is no way that I know of to debug
the darn thing. I'm getting a null reference but I have no idea where
or if it's even in my code.

I went through and checked all of my fields and they all have default
values set. All of the child controls are initialized too.

This has very little impact on my use of the control, but I'd like to
release it to the rest of the group and I don't want it to be sloppy.
And I'd like it to be easy to use
bruce barker - 06 Sep 2007 21:09 GMT
Page.Request is null at design time, so be sure it not referenced at
design time.

-- bruce (sqlwork.com)

> I've created a composite control that uses 6 textboxes and 2 buttons.
> The control works fine, but the design time is frequently goofed up.
[quoted text clipped - 12 lines]
> release it to the rest of the group and I don't want it to be sloppy.
> And I'd like it to be easy to use
Boot2TheHead - 06 Sep 2007 21:35 GMT
My only call to the Page object is in OnPreRender. So no worries
there. But it was a good thing to check. I added a null check in front
of the call to the Page object just to be safe.

> Page.Request is null at design time, so be sure it not referenced at
> design time.
>
> -- bruce (sqlwork.com)

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.