How to find out whether i'm in window or web!!!?

  • Thread starter Thread starter Vadivel Kumar
  • Start date Start date
V

Vadivel Kumar

Hi folks,

I'm writing a framework in C# which will be my business facade object
consists
of all data layer, BL etc.,

Now the deal is, my client doesn't have any idea of whether making the
presentation layer
as a web interface or window interface, that's make a challenging effort for
me now. In some part of my code, I have to identify whether the framework is
deployed in window or web interface.

So, the question is how to find out whether it is window or web interface
from my framework?

Cheers!
Vadivel Kumar
 
You can check System.Web.HttpContext.Current. It is null if you are not
responding on an http request, in other words you are not called from an
asp.net application.

Eliyahu
 
But, how to find out which kind of interface my framework
are called whether it is from a mobile, a window, a web request
???

Cheers
Vadivel Kumar
 
The ui shouldn't really matter to the business objects. You should design
for the objects to work with any UI.
 
But, in some ocassions if i need to know whether the objects
are instantiated thru a window or web or others then how
can know that?

Cheers
Vadivel Kumar
 
Back
Top