Problem with a user control

Results 1 to 2 of 2

Thread: Problem with a user control

  1. #1
    Join Date
    Dec 1969

    Default Problem with a user control

    I am designing a calendar user control (I am aware one exists, it doesn&#039;t have enough functionality) in ASP.NET, but I am having problems accessing its public properties when it is instantiated.<BR><BR>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.<BR><BR>The properties I am having problems with access these hashtables.<BR><BR>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:<BR><BR>System.NullReferenceException: Object variable or With block variable not set.<BR><BR>I can post code if necessary. Thanks in advance.

  2. #2
    Join Date
    Dec 1969

    Default Why not extend the existing calendar control?

    You say that you are aware that a calendar control exists but "it doesn&#039;t have enough functionality." So why not inherit the existing control and add in the functionality that you want?<BR><BR>(Forgive me if you&#039;ve already considered this possibility as well and dismissed it.)<BR><BR>What functionality are you looking for that isn&#039;t provided by the calendar control?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts