Windows Develop Bookmark and Share   
 index > Windows Forms Designer > Site Property
 

Site Property

Is it that the Site Property of a Component is not available at Runtime.
Actually I have developed a custom Control and placed it on a Windows Form.
In one of the properties of the Control I have used this.Site.Name = .....

But whn I run the application it gives me a NullReferenceException saying the Site is null.

Can u tell me what can be done abt this.

Regards
Vikas
MigrationUser 1  Thursday, February 27, 2003 7:32 AM
The Site object is used for designtime support.  It is not available at runtime.  There is a string Name property on Control you could use though.

 - mike
MigrationUser 1  Thursday, February 27, 2003 4:32 PM
thanx mike
MigrationUser 1  Monday, March 03, 2003 12:47 PM

You can use google to search for other answers

Custom Search

More Threads

• Help with creating a custom designer
• ImageList ImageStream property corrupted in the form's resx file (repost)
• cannot access a disposed object Object name: 'Microsoft.VisualStudio.Design.VSDedignSurface'
• Second screen
• Themed Toolbar ignores ButtonSize
• PropertyGrid mulitiselect TypeConverter doesn't get called
• collection of groups with collection of controls not removing instances of controls from code
• Creat and activate Child form
• GridView control paging issue
• usercontrol expandable properties