System.Web.UI.Page.ProcessRequest C# (CSharp) Метод

ProcessRequest() приватный Метод

private ProcessRequest ( HttpContext context ) : void
context HttpContext
Результат void
	public virtual void ProcessRequest (HttpContext context)
	{
		SetContext (context);
		
		if (clientTarget != null)
			Request.ClientTarget = clientTarget;

		WireupAutomaticEvents ();
		//-- Control execution lifecycle in the docs

		// Save culture information because it can be modified in FrameworkInitialize()
		_appCulture = Thread.CurrentThread.CurrentCulture;
		_appUICulture = Thread.CurrentThread.CurrentUICulture;
		FrameworkInitialize ();
#if NET_4_0
		frameworkInitialized = true;
#endif
		context.ErrorPage = _errorPage;

		try {
			InternalProcessRequest ();
		} catch (ThreadAbortException taex) {
			if (FlagEnd.Value == taex.ExceptionState)
				Thread.ResetAbort ();
			else
				throw;
		} catch (Exception e) {
			ProcessException (e);
		} finally {
			ProcessUnload ();
		}
	}

Usage Example

 public static IStateFormatter CreateFormatter()
 {
     HttpResponse response = new HttpResponse(TextWriter.Null);
     HttpRequest request = new HttpRequest("__token__.aspx", 
         HttpContext.Current.Request.Url.ToString(), "__EVENTTARGET=true&__VIEWSTATEENCRYPTED=true");
     HttpContext context = new HttpContext(request, response);
     
     Page page = new Page();
     page.EnableViewStateMac = true;
     page.ViewStateEncryptionMode = ViewStateEncryptionMode.Always;
     
     page.ProcessRequest(context);
     return new TokenPersister(page).StateFormatter;
 }
All Usage Examples Of System.Web.UI.Page::ProcessRequest
Page