How would i go about to do this?
protected void Page_Load(object sender, EventArgs e)
{
try
{
doSomething();
}
catch (Exception ex)
{
// Here i would like to know that the page is "Problem.aspx"
// and that it was caused from the doSomething() function
}
}
private void doSomething()
{
logToSomething();
}
I’m using this little class to log errors, have a look on how i get the page and the function(Stacktrace):
It’s entirely sufficient for me.
Note: converted from VB.NET, hence untested