473,394 Members | 1,699 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

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 1232
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Dave McCracken | last post by:
I am hosting .Net UserControls in HTML pages with Object Tags. These UserControls are clients of remotable objects that run on the same machine. The remote objects execute callbacks via sponsor...
4
by: ATS | last post by:
BUG/PRODUCTION-DOWN: UserControl running from HTML not working. Someone please help, I have a production down situation. For whatever reason, UserControls are not owkring from HTML/IE. When...
0
by: 6tc1 | last post by:
Hi all, I've got a UserControl that contains a few PictureBox objects. If I click on outside of the Picture in the UserControl, the scrolling with the mouse button works - however, no amount of...
2
by: Ben Fidge | last post by:
What is the correct way to determine when your app is running on my development machine and when it is running on the live server? In the web.config file you can specify how errors are displayed...
7
by: Sharon | last post by:
I'm writing my own control that derived from the UserControl. In my control I have some public properties (with get and set) that I do not want them to be shown on the designer properties window...
6
by: MeowCow | last post by:
I have created a UserControl that encapsulates a third party data grid. My goal was to create my own DataSource and DataMember properties that forward the binding to the third party grid, then use...
9
by: Johnny Jörgensen | last post by:
Hi y'all I've got a custom control that is inherited from a normal TextBox. To that, I've added a new property that I call "Units", Which is a collection class containing members of a "Unit"...
14
by: =?Utf-8?B?QWxleCBNYWdoZW4=?= | last post by:
Hi. I have created a UserControl ("MyUC"). I've put a bunch of instances of that control on a Page ("Defaul.aspx"). The control works fine. Now, I want to be able to use "FindControl()" from...
5
by: billsahiker | last post by:
I saw one post here that basically said no way, but not sure which vs version was being discussed. Using vs 2005 I develped a user control in a vb project and would like to use that usercontrol in...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.