Sometimes while executing following code you may get error “Unable to evaluate expression because the code is optimized or a native frame is on top of the call stack”
string url = "myURL.aspx?UserId=" + this.UserId.ToString();
It is because you are redirecting the page without execution gets complete. so solution is either you Perform a search for Response.Redirect() and either make the second parameter endResponse = false, or Temporarily disable the redirect call.
Try following code. It will work.
False indicate : Indicate execution of current page should not be terminated.
Hope it helps.