Method for checking IsPostBack or IsCallBack from VB.NET class

I need to find out from the VB.NET class (and not the user control) whether the current request is PostBack and / or CallBack (AJAX). Previously, I could receive information about the request, response, session, etc. Via HttpContext.Current, but I could not find the Page object in HttpContext.Current.

Is it possible?

+3
source share
2 answers

HttpContext.Current.Handler will return System.Web.IHandler, which may be System.Web.UI.Page. Use the as operator to direct it to the page, and be sure to check if it is null before using it.

+6

"", , , HTTP "POST" ?

+3

Source: https://habr.com/ru/post/1726082/


All Articles