Wrox Programmer Forums
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 31st, 2004, 09:09 AM
Registered User
 
Join Date: Jan 2004
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default Problems with a user control

 I am designing a calendar user control (I am aware one exists, it doesn't have enough functionality) in ASP.NET, but I am having problems accessing its public properties when it is instantiated.

To create the calendar, I programattically create a table during the Page_Load event. When each cell is added to the table, it is also added to a Hashtable so that I can easily access it later.

The properties I am having problems with access these hashtables.

The problem I am having is this: While I can use these properties sucessfully from within the control itself (for example, in the Page_Load event after the calendar is created), when I try to access these same properties from the page using the control, it fails with this error:

System.NullReferenceException: Object variable or With block variable not set.

I can post code if necessary. Thanks in advance.

 
Old August 31st, 2004, 09:23 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,101
Thanks: 0
Thanked 2 Times in 2 Posts
Default

I can't help with the specific problem your having- but why not inherit the calendar control and then extend it - rather than starting from scratch?


Hal Levy
Web Developer, PDI Inc.

NOT a Wiley/Wrox Employee
 
Old August 31st, 2004, 11:56 AM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 1,998
Thanks: 0
Thanked 3 Times in 3 Posts
Default

Hey,

Post code please. In addition, is Hal's recommendation not possible, for whatever reason?

Brian





Similar Threads
Thread Thread Starter Forum Replies Last Post
Add Windows User control in Web User Control agarwalvidhu C# 0 March 30th, 2006 01:17 AM
Help! Custom Server Control using User Control diehard ASP.NET 1.0 and 1.1 Professional 2 January 4th, 2006 12:33 PM
Help with control initialization in user control mike_remember ASP.NET 1.0 and 1.1 Professional 7 December 19th, 2005 11:08 AM
User authentication problems bobbby Dreamweaver (all versions) 4 September 28th, 2004 12:46 AM
Sessions - one user has problems kc5f Beginning PHP 7 June 8th, 2004 07:43 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.