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

[388 byte] By [codefund.com] at [2008-2-15]
# 1
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

codefund.com at 2007-9-8 > top of Msdn Tech,Windows Forms,Windows Forms Designer...
# 2
thanx mike
codefund.com at 2007-9-8 > top of Msdn Tech,Windows Forms,Windows Forms Designer...