View Single Post
  #2 (permalink)  
Old June 2nd, 2006, 05:38 PM
Imar's Avatar
Imar Imar is offline
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 Posts
Default

Hi Bean,

You need to add a reference to the markup of your page, so the code behind knows what control you're talking about. You can either set the Control property to the user control or the VirtualPath property. Here's a quick example:

<%@ Reference Control="~/Controls/AdminMenu.ascx" %>

Then in your code behind, you can new up an instance of AdminMenu (in this example)

Hope this helps,

Imar
---------------------------------------
Imar Spaanjaars
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004