Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > How to judge whether it is under the design mode?

Reply
Thread Tools

How to judge whether it is under the design mode?

 
 
Laser Lu
Guest
Posts: n/a
 
      06-01-2004
I want to judge whether it is currently under the design mode in the code when I was developing a web control. The question is how to achieve it? Is there any property that indicates the current mode the code was runnig under?
 
Reply With Quote
 
 
 
 
Jim Cheshire [MSFT]
Guest
Posts: n/a
 
      06-01-2004
Hi,

One way to do this is to check HttpContext.Current. If it's null, you are
in design mode.

Jim Cheshire, MCSE, MCSD [MSFT]
ASP.NET
Developer Support
http://www.velocityreviews.com/forums/(E-Mail Removed)

This post is provided "AS-IS" with no warranties and confers no rights.

--------------------
>Thread-Topic: How to judge whether it is under the design mode?
>thread-index: AcRH0ByXWCzwZIgNTv+AOISpBL1/pw==
>X-WN-Post: microsoft.public.dotnet.framework.aspnet.webcontro ls
>From: "=?Utf-8?B?TGFzZXIgTHU=?=" <(E-Mail Removed)>
>Subject: How to judge whether it is under the design mode?
>Date: Tue, 1 Jun 2004 05:01:03 -0700
>Lines: 1
>Message-ID: <(E-Mail Removed)>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontro ls
>Path: cpmsftngxa10.phx.gbl
>Xref: cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.aspnet.webcontro ls:21065
>NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontro ls
>
>I want to judge whether it is currently under the design mode in the code

when I was developing a web control. The question is how to achieve it? Is
there any property that indicates the current mode the code was runnig
under?
>


 
Reply With Quote
 
 
 
 
Laser Lu
Guest
Posts: n/a
 
      06-02-2004
A further question: How to get the file path of the current editing aspx page

----- Jim Cheshire [MSFT] wrote: ----

Hi,

One way to do this is to check HttpContext.Current. If it's null, you are
in design mode

Jim Cheshire, MCSE, MCSD [MSFT
ASP.NE
Developer Suppor
(E-Mail Removed)

This post is provided "AS-IS" with no warranties and confers no rights

-------------------
>Thread-Topic: How to judge whether it is under the design mode
>thread-index: AcRH0ByXWCzwZIgNTv+AOISpBL1/pw=
>X-WN-Post: microsoft.public.dotnet.framework.aspnet.webcontro l
>From: "=?Utf-8?B?TGFzZXIgTHU=?=" <(E-Mail Removed)>>Subject: How to judge whether it is under the design mode
>Date: Tue, 1 Jun 2004 05:01:03 -070
>Lines:
>Message-ID: <(E-Mail Removed)>>MIME-Version: 1.
>Content-Type: text/plain
> charset="Utf-8
>Content-Transfer-Encoding: 7bi
>X-Newsreader: Microsoft CDO for Windows 200
>Content-Class: urn:content-classes:messag
>Importance: norma
>Priority: norma
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.
>Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontro l
>Path: cpmsftngxa10.phx.gb
>Xref: cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.aspnet.webcontro ls:2106
>NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.18
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontro l
>>I want to judge whether it is currently under the design mode in the code

when I was developing a web control. The question is how to achieve it? Is
there any property that indicates the current mode the code was runnig
under
>

 
Reply With Quote
 
Laser Lu
Guest
Posts: n/a
 
      06-02-2004
I'm now developing a web control. However, some information necessary to render the control is unavailable at design time. So I have to get accessed to the design time object model of the IDE, in order to find a alternative information. Then how to access the design time object model?
 
Reply With Quote
 
Laser Lu
Guest
Posts: n/a
 
      06-02-2004
For example, if I want to get the information of the currently editting aspx file, then how to do it

----- Laser Lu wrote: ----

I'm now developing a web control. However, some information necessary to render the control is unavailable at design time. So I have to get accessed to the design time object model of the IDE, in order to find a alternative information. Then how to access the design time object model?
 
Reply With Quote
 
Jim Cheshire [MSFT]
Guest
Posts: n/a
 
      06-04-2004
Laser,

What information specifically are you looking for?

Jim Cheshire, MCSE, MCSD [MSFT]
ASP.NET
Developer Support
(E-Mail Removed)

This post is provided "AS-IS" with no warranties and confers no rights.

--------------------
>Thread-Topic: How to judge whether it is under the design mode?
>thread-index: AcRITSPDHSBJmcOISGmBgOvOF0BBKA==
>X-WN-Post: microsoft.public.dotnet.framework.aspnet.webcontro ls
>From: "=?Utf-8?B?TGFzZXIgTHU=?=" <(E-Mail Removed)>
>References: <(E-Mail Removed)>

<(E-Mail Removed)>
>Subject: RE: How to judge whether it is under the design mode?
>Date: Tue, 1 Jun 2004 19:56:02 -0700
>Lines: 5
>Message-ID: <(E-Mail Removed)>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontro ls
>Path: cpmsftngxa10.phx.gbl
>Xref: cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.aspnet.webcontro ls:21086
>NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontro ls
>
>For example, if I want to get the information of the currently editting

aspx file, then how to do it?

----- Laser Lu wrote: -----

I'm now developing a web control. However, some information necessary
to render the control is unavailable at design time. So I have to get
accessed to the design time object model of the IDE, in order to find a
alternative information. Then how to access the design time object model?
>


 
Reply With Quote
 
Laser Lu
Guest
Posts: n/a
 
      06-06-2004
For example, I want to get the file path of the currently editing aspx page in code. Is that possible?
 
Reply With Quote
 
Jim Cheshire [MSFT]
Guest
Posts: n/a
 
      06-07-2004
Hi,

Yes, it is possible via extensibility. DTE.ActiveDocument.FullName will
return the path to the document currently being edited.

Jim Cheshire, MCSE, MCSD [MSFT]
ASP.NET
Developer Support
(E-Mail Removed)

This post is provided "AS-IS" with no warranties and confers no rights.

--------------------
>Thread-Topic: How to judge whether it is under the design mode?
>thread-index: AcRLpX3M2N4CeykVQk6vSMjOWxuWXA==
>X-WN-Post: microsoft.public.dotnet.framework.aspnet.webcontro ls
>From: "=?Utf-8?B?TGFzZXIgTHU=?=" <(E-Mail Removed)>
>References: <(E-Mail Removed)>

<(E-Mail Removed)>
<(E-Mail Removed)>
<(E-Mail Removed)>
>Subject: RE: How to judge whether it is under the design mode?
>Date: Sun, 6 Jun 2004 02:06:02 -0700
>Lines: 1
>Message-ID: <(E-Mail Removed)>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontro ls
>Path: cpmsftngxa10.phx.gbl
>Xref: cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.aspnet.webcontro ls:21193
>NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontro ls
>
>For example, I want to get the file path of the currently editing aspx

page in code. Is that possible?
>


 
Reply With Quote
 
Jim Cheshire [MSFT]
Guest
Posts: n/a
 
      06-08-2004
Good deal. Thanks for updating. Glad to help.

Jim Cheshire, MCSE, MCSD [MSFT]
ASP.NET
Developer Support
(E-Mail Removed)

This post is provided "AS-IS" with no warranties and confers no rights.


--------------------
>Thread-Topic: How to judge whether it is under the design mode?
>thread-index: AcRMsQT/HcjI5EhLQtmSBnK/8HMRxw==
>X-WN-Post: microsoft.public.dotnet.framework.aspnet.webcontro ls
>From: "=?Utf-8?B?TGFzZXIgTHU=?=" <(E-Mail Removed)>
>References: <(E-Mail Removed)>

<(E-Mail Removed)>
<(E-Mail Removed)>
<(E-Mail Removed)>
<(E-Mail Removed)>
<(E-Mail Removed)>
>Subject: RE: How to judge whether it is under the design mode?
>Date: Mon, 7 Jun 2004 10:01:04 -0700
>Lines: 41
>Message-ID: <(E-Mail Removed)>
>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontro ls
>Path: cpmsftngxa10.phx.gbl
>Xref: cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.aspnet.webcontro ls:21209
>NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontro ls
>
>

Hi, Jim! Thank you very much!! It really works!
----- Jim Cheshire [MSFT] wrote: -----

Hi,

Yes, it is possible via extensibility. DTE.ActiveDocument.FullName
will
return the path to the document currently being edited.

Jim Cheshire, MCSE, MCSD [MSFT]
ASP.NET
Developer Support
(E-Mail Removed)

This post is provided "AS-IS" with no warranties and confers no rights.

--------------------
>Thread-Topic: How to judge whether it is under the design mode?
>thread-index: AcRLpX3M2N4CeykVQk6vSMjOWxuWXA==
>X-WN-Post: microsoft.public.dotnet.framework.aspnet.webcontro ls
>From: "=?Utf-8?B?TGFzZXIgTHU=?="

<(E-Mail Removed)>>References :
<(E-Mail Removed)><9857E26A-6E51-4529-8F7A
(E-Mail Removed)><3DFFF806-3F6E-4FC4-90D9-C54457BC9AF4@microsoft.
com><(E-Mail Removed)>>Subject : RE: How to judge
whether it is under the design mode?
>Date: Sun, 6 Jun 2004 02:06:02 -0700
>Lines: 1
>Message-ID:

<(E-Mail Removed)>>MIME-Version: 1.0
>Content-Type: text/plain;
> charset="Utf-8"
>Content-Transfer-Encoding: 7bit
>X-Newsreader: Microsoft CDO for Windows 2000
>Content-Class: urn:content-classes:message
>Importance: normal
>Priority: normal
>X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
>Newsgroups: microsoft.public.dotnet.framework.aspnet.webcontro ls
>Path: cpmsftngxa10.phx.gbl
>Xref: cpmsftngxa10.phx.gbl

microsoft.public.dotnet.framework.aspnet.webcontro ls:21193
>NNTP-Posting-Host: tk2msftcmty1.phx.gbl 10.40.1.180
>X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webcontro ls
>>For example, I want to get the file path of the currently editing

aspx
page in code. Is that possible?
>
>


 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
any ways to judge whether an object is initilized or not in a class momobear Python 26 03-26-2007 07:43 AM
Whether the following program implement the factory Design sunny C++ 10 12-08-2006 08:40 AM
How to judge whether a browser supports ActiveX? morgan.chengmo@gmail.com Javascript 2 07-20-2006 01:29 PM
Judge Judy hears a web design case Michael Wilcox HTML 20 12-31-2003 09:22 PM



Advertisments