470,613 Members | 1,735 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,613 developers. It's quick & easy.

Web UserControl - how to determine whether running in IDE

As the Web UserControl class has no DesignMode property
(it's not derived from Component), how do you tell if
your UserControl is running in the IDE.

I've got a public property on my UserControl that
persists it's value to the ViewState in its "set"
accessor, and reads it's value from there in its "get"
accessor. Obviously, at design time the ViewState is not
available and the IDE throws an exception when I open the
UserControl's "edit window" in the IDE. I know for sure
that this is due to my property's "get" accessor trying
to read from the ViewState.

How do I determine if my Usercontrol is running from
within the IDE?

Thanks

Ben
Nov 18 '05 #1
1 1163
In article <1f*****************************@phx.gbl>,
be*******@btopenworld.com says...
How do I determine if my Usercontrol is running from
within the IDE?


The VS.NET IDE acts as a "debugger", so check out:

System.Diagnostics.Debugger.IsAttached

--
Patrick Steele
Microsoft .NET MVP
http://weblogs.asp.net/psteele
Nov 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by MeowCow | last post: by
14 posts views Thread by =?Utf-8?B?QWxleCBNYWdoZW4=?= | last post: by
5 posts views Thread by billsahiker | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.