Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Rendering Custom Controls under the Personal Web Server
Message
De
31/10/2006 08:47:39
 
 
À
26/10/2006 09:29:00
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Divers
Thread ID:
01164689
Message ID:
01165752
Vues:
12
Ok, for any interested I found a resolution ( really a workaround but it does resolve the problem ) courtesy of Miguel Castro who is pretty much a guru in ASP.NET custom controls and was kind enough to help me out with this.

You can also test for the existence of an http Context along with the UserInteractive test, so the test becomes (C#):
(... && (!System.Environment.UserInteractive || this.Context != null))
So if you are not in user interactive mode or the http Context is not null ( I.e. there is one ), you fire the code to write out the javascript.

Bill

>I have a custom DataGrid subclassed from the VS2K3 DataGrid. After recompiling this DataGrid in VS2K5 for use under .NET 2.0 I have some anomalies from running under the local, personal web server in VS2K5.
>
>The grid's OnItemDataBound event is overridden to add some javascript onclick code to the cells. Some tests are performed in this event to determine if the code is written or not. One of the tests is (...!System.Environment.UserInteractive). The purpose for this test is to enable the control to render correctly in the IDE when developing. I.e. the javascript code should not be written when in the development IDE and this test supports this. UserInteractive returns true when in the development IDE but false when running under IIS and has functioned flawlessly under ASP.NET 1.1.
>
>The problem is that when running under the VS2K5 local personal web server, UserInteractive also returns true ( instead of false as running under IIS ). I don't know if this is a bug or by design but under these conditions the control either will not render correctly in the IDE, or will not operate correctly when testing under the VS2K5 local personal web server.
>
>Is there some setting that can be changed or a different property tested to resolve this issue?
>
>Thanks,
>Bill
William A. Caton III
Software Engineer
MAXIMUS
Atlanta, Ga.
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform