Name of Calling function [Resolved]
Hi,
I have Classes that are shared between web apps and windows apps. One of my class is an Error Hanlder which handles all errors and logs them. Now if the class is used in Windows App i display the error message using message box, now since in ASP.Net i cant display Message Box, i want to display the error message using Trace class.
Now what i need a way of identifying whether the class is used in ASP.net or C#. So i can do something like
if (Source) = WinApp
{
MessageBox(ex.Message);
LogError(ex);
}
else
{
WriteTraceInfo(ex);
LogError(ex);
}
Thanks for any help.