Presentation layers CodeSample - Determine runtime if your application is running over DHTML or Silverlight
Categories: Configuration, Silverlight
|
Tags: Developers, 1. Beginner, Silverlight, Pre v6.3, v6.3, 2. Intermediate, 3. Advanced
Revision:
1
Posted:
05/Oct/2009
Updated:
23/July/2010
Status:
Publish
Types: Article
|
This article will have a few sections added to it soon, based on the following article type skeleton: CodeSample OverviewRunning multiple presentation layers, then on occasions, there is a need to differenciate between a request from a DHTML client and a request from a Silverlight client How to do itYou first need to know in code what are the used extensions of both DHTML and Silverlight. This can actually be retrieved directly from web.config, but more convenient is to use the following:
Context.Config.GetFeatureValue("Extension",".wgx")
Context.Config.GetFeatureValue("SilverlightExtension", ".swgx")
Next you need to find out how the client initiated the request.
VWGContext.Current.HttpContext.Request.UrlReferrer.ToString()
Typical response from this request would be http://localhost/Form1.wgx From this output, it should be trivial to extract the extension used. Note however, that if your request includes any query parameters, you need to account for them.
About the author
Related Articles
|
Configuration
|
|
|
Visual WebGui version 6.2 features complete integration into the Microsoft Visual Studio development system, a consolidated installation process, and the opportunity to use Microsoft Visual Studio Express Editions for software evaluation and trials. Attend this webcast to learn how the Visual WebGui...
Tags:
Developers, Visual WebGui Pipeline, Visual Studio, 1. Beginner, 2. Intermediate, 3. Advanced, Integration, Pre v6.3, v6.3, v6.4 and Later
|
|
|
Tags:
Developers, 2. Intermediate, 3. Advanced, Customization, WCF, Pre v6.3, v6.3, v6.4 and Later
|
|
|
Tags:
Architects, Developers, XML, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
|
|
|
Tags:
Architects, Developers, XML, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
|
|
|
Tags:
Architects, Developers, XML, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
|
|
|
Tags:
Architects, Developers, XML, 1. Beginner, 2. Intermediate, 3. Advanced, Pre v6.3, v6.3, v6.4 and Later
|
|
|
|