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

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
 
E

Eliyahu Goldin

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
 
V

Vadivel Kumar

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
 
G

Guest

The ui shouldn't really matter to the business objects. You should design
for the objects to work with any UI.
 
V

Vadivel Kumar

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,050
Latest member
AngelS122

Latest Threads

Top