注意一下,该类继承自Demo类,也就是后台类,而后台类又继承自Page类。下面进入ProcessRequest方法 又调用了父类的ProcessRequest方法base.ProcessRequest(context);这个Page类的一个方法,看这个类的组成
1 [Designer("Microsoft.VisualStudio.Web.WebForms.WebFormDesigner, Microsoft.VisualStudio.Web, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(IRootDesigner)), DefaultEvent("Load"), ToolboxItem(false), DesignerCategory("ASPXCodeBehind"), DesignerSerializer("Microsoft.VisualStudio.Web.WebForms.WebFormCodeDomSerializer, Microsoft.VisualStudio.Web, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.Serialization.TypeCodeDomSerializer, System.Design, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
2 public class Page : TemplateControl, IHttpHandler
3 {
4 // Fields
5 internal HttpApplicationState _application;
6 private bool _aspCompatMode;
7 private AspCompatApplicationStep _aspCompatStep;
8 private bool _asyncMode;
9 private PageAsyncTaskManager _asyncTaskManager;
10 private TimeSpan _asyncTimeout;
11 private bool _asyncTimeoutSet;
12 private Control _autoPostBackControl;
13 internal Cache _cache;
14 private bool _cachedRequestViewState;
15 private ICallbackEventHandler _callbackControl;
16 private ArrayList _changedPostDataConsumers;
17 private string _clientQueryString;
18 private ClientScriptManager _clientScriptManager;
19 private string _clientState;
20 private bool _clientSupportsJavaScript;
21 private bool _clientSupportsJavaScriptChecked;
22 private string _clientTarget;
23 private bool _containsCrossPagePost;
24 private bool _containsEncryptedViewState;
25 private IDictionary _contentTemplateCollection;
26 internal HttpContext _context;
27 private ArrayList _controlsRequiringPostBack;
28 private StringSet _controlStateLoadedControlIds;
29 private Stack _dataBindingContext;
30 private string _descriptionToBeSet;
31 private bool _designMode;
32 private bool _designModeChecked;
33 private CultureInfo _dynamicCulture;
34 private CultureInfo _dynamicUICulture;
35 private ArrayList _enabledControls;
36 private bool _enableEventValidation;
37 private bool _enableViewStateMac;
38 private ViewStateEncryptionMode _encryptionMode;
39 internal string _errorPage;
40 private Control _focusedControl;
41 private string _focusedControlID;
42 private bool _fOnFormRenderCalled;
43 private HtmlForm _form;
44 private bool _fPageLayoutChanged;
45 private bool _fPostBackScriptRendered;
46 private bool _fRequirePostBackScript;
47 private bool _fRequireWebFormsScript;
48 private bool _fWebFormsScriptRendered;
49 private bool _haveIdSeparator;
50 private HtmlHead _header;
51 internal Dictionary<string, string> _hiddenFieldsToRender;
52 private char _idSeparator;
53 private bool _inOnFormRender;
54 private bool _isCallback;
55 private bool _isCrossPagePostBack;
56 private IDictionary _items;
57 private string _keywordsToBeSet;
58 private NameValueCollection _leftoverPostData;
59 private LegacyPageAsyncInfo _legacyAsyncInfo;
60 private LegacyPageAsyncTaskManager _legacyAsyncTaskManager;
61 private bool _maintainScrollPosition;
62 private MasterPage _master;
63 private VirtualPath _masterPageFile;
64 private static readonly TimeSpan _maxAsyncTimeout;
65 private int _maxPageStateFieldLength;
66 private ModelBindingExecutionContext _modelBindingExecutionContext;
67 private ModelStateDictionary _modelState;
68 private bool _needToPersistViewState;
69 private PageAdapter _pageAdapter;
70 private SimpleBitVector32 _pageFlags;
71 private Stack _partialCachingControlStack;
72 private PageStatePersister _persister;
73 private RenderMethod _postFormRenderDelegate;
74 private bool _preInitWorkComplete;
75 private Page _previousPage;
76 private VirtualPath _previousPagePath;
77 private bool _profileTreeBuilt;
78 internal HybridDictionary _registeredControlsRequiringClearChildControlState;
79 internal ControlSet _registeredControlsRequiringControlState;
80 private ArrayList _registeredControlsThatRequirePostBack;
81 private IPostBackEventHandler _registeredControlThatRequireRaiseEvent;
82 private string _relativeFilePath;
83 internal HttpRequest _request;
84 private NameValueCollection _requestValueCollection;
85 private string _requestViewState;
86 private bool _requireFocusScript;
87 private bool _requireScrollScript;
88 internal HttpResponse _response;
89 private static Type _scriptManagerType;
90 private int _scrollPositionX;
91 private const string _scrollPositionXID = "__SCROLLPOSITIONX";
92 private int _scrollPositionY;
93 private const string _scrollPositionYID = "__SCROLLPOSITIONY";
94 private HttpSessionState _session;
95 private bool _sessionRetrieved;
96 private SmartNavigationSupport _smartNavSupport;
97 private PageTheme _styleSheet;
98 private string _styleSheetName;
99 private int _supportsStyleSheets;
100 private PageTheme _theme;
101 private string _themeName;
102 private string _titleToBeSet;
103 private int _transactionMode;
104 private string _uniqueFilePathSuffix;
105 private UnobtrusiveValidationMode? _unobtrusiveValidationMode;
106 private NameValueCollection _unvalidatedRequestValueCollection;
107 private bool _validated;
108 private string _validatorInvalidControl;
109 private ValidatorCollection _validators;
110 private bool _viewStateEncryptionRequested;
111 private string _viewStateUserKey;
112 private XhtmlConformanceMode _xhtmlConformanceMode;
113 private bool _xhtmlConformanceModeSet;
114 internal const bool BufferDefault = true;
115 internal const string callbackID = "__CALLBACKID";
116 internal const string callbackIndexID = "__CALLBACKINDEX";
117 internal const string callbackLoadScriptID = "__CALLBACKLOADSCRIPT";
118 internal const string callbackParameterID = "__CALLBACKPARAM";
119 internal static readonly int DefaultAsyncTimeoutSeconds;
120 internal static readonly int DefaultMaxPageStateFieldLength;
121 private const string EnabledControlArray = "__enabledControlArray";
122 internal const bool EnableEventValidationDefault = true;
123 internal const bool EnableViewStateMacDefault = true;
124 internal const ViewStateEncryptionMode EncryptionModeDefault = ViewStateEncryptionMode.Auto;
125 internal static readonly object EventInitComplete;
126 internal static readonly object EventLoadComplete;
127 internal static readonly object EventPreInit;
128 internal static readonly object EventPreLoad;
129 internal static readonly object EventPreRenderComplete;
130 internal static readonly object EventSaveStateComplete;
131 internal const string EventValidationPrefixID = "__EVENTVALIDATION";
132 private static readonly Version FocusMinimumEcmaVersion;
133 private static readonly Version FocusMinimumJScriptVersion;
134 private const string HiddenClassName = "aspNetHidden";
135 private const int isCrossPagePostRequest = 8;
136 private const int isExportingWebPart = 2;
137 private const int isExportingWebPartShared = 4;
138 private const int isPartialRenderingSupported = 0x10;
139 private const int isPartialRenderingSupportedSet = 0x20;
140 private static readonly Version JavascriptMinimumVersion;
141 private const string lastFocusID = "__LASTFOCUS";
142 internal const bool MaintainScrollPositionOnPostBackDefault = false;
143 private static readonly Version MSDomScrollMinimumVersion;
144 private const string PageID = "__Page";
145 private const string PageReEnableControlsScriptKey = "PageReEnableControlsScript";
146 private const string PageRegisteredControlsThatRequirePostBackKey = "__ControlsRequirePostBackKey__";
147 private const string PageScrollPositionScriptKey = "PageScrollPositionScript";
148 private const string PageSubmitScriptKey = "PageSubmitScript";
149 [EditorBrowsable(EditorBrowsableState.Never)]
150 public const string postEventArgumentID = "__EVENTARGUMENT";
151 [EditorBrowsable(EditorBrowsableState.Never)]
152 public const string postEventSourceID = "__EVENTTARGET";
153 internal const string previousPageID = "__PREVIOUSPAGE";
154 private static StringSet s_systemPostFields;
155 private static char[] s_varySeparator;
156 private const int skipFormActionValidation = 0x40;
157 internal const bool SmartNavigationDefault = false;
158 private const int styleSheetInitialized = 1;
159 internal const string systemPostFieldPrefix = "__";
160 private static readonly string UniqueFilePathSuffixID;
161 internal const string ViewStateEncryptionID = "__VIEWSTATEENCRYPTED";
162 internal const string ViewStateFieldCountID = "__VIEWSTATEFIELDCOUNT";
163 internal const string ViewStateFieldPrefixID = "__VIEWSTATE";
164 internal const string WebPartExportID = "__WEBPARTEXPORT";
165
166 // Events
167 [EditorBrowsable(EditorBrowsableState.Advanced)]
168 public event EventHandler InitComplete;
169 [EditorBrowsable(EditorBrowsableState.Advanced)]
170 public event EventHandler LoadComplete;
171 public event EventHandler PreInit;
172 [EditorBrowsable(EditorBrowsableState.Advanced)]
173 public event EventHandler PreLoad;
174 [EditorBrowsable(EditorBrowsableState.Advanced)]
175 public event EventHandler PreRenderComplete;
176 [EditorBrowsable(EditorBrowsableState.Advanced)]
177 public event EventHandler SaveStateComplete;
178
179 // Methods
180 static Page();
181 public Page();
182 [EditorBrowsable(EditorBrowsableState.Never)]
183 protected internal void AddContentTemplate(string templateName, ITemplate template);
184 [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
185 public void AddOnPreRenderCompleteAsync(BeginEventHandler beginHandler, EndEventHandler endHandler);
186 public void AddOnPreRenderCompleteAsync(BeginEventHandler beginHandler, EndEventHandler endHandler, object state);
187 [EditorBrowsable(EditorBrowsableState.Never)]
188 protected internal void AddWrappedFileDependencies(object virtualFileDependencies);
189 internal void ApplyControlSkin(Control ctrl);
190 [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")]
191 internal bool ApplyControlStyleSheet(Control ctrl);
192 private void ApplyMasterPage();
193 [EditorBrowsable(EditorBrowsableState.Never)]
194 protected IAsyncResult AspCompatBeginProcessRequest(HttpContext context, AsyncCallback cb, object extraData);
195 [EditorBrowsable(EditorBrowsableState.Never)]
196 protected void AspCompatEndProcessRequest(IAsyncResult result);
197 [EditorBrowsable(EditorBrowsableState.Never)]
198 protected IAsyncResult AsyncPageBeginProcessRequest(HttpContext context, AsyncCallback callback, object extraData);
199 [EditorBrowsable(EditorBrowsableState.Never)]
200 protected void AsyncPageEndProcessRequest(IAsyncResult result);
201 private void AsyncPageProcessRequestBeforeAsyncPointCancellableCallback(object state);
202 internal void BeginFormRender(HtmlTextWriter writer, string formUniqueID);
203 private void BuildPageProfileTree(bool enableViewState);
204 private void CheckRemainingAsyncTasks(bool isThreadAbort);
205 private CancellationTokenSource CreateCancellationTokenFromAsyncTimeout();
206 [EditorBrowsable(EditorBrowsableState.Advanced)]
207 protected internal virtual HtmlTextWriter CreateHtmlTextWriter(TextWriter tw);
208 public static HtmlTextWriter CreateHtmlTextWriterFromType(TextWriter tw, Type writerType);
209 internal static HtmlTextWriter CreateHtmlTextWriterInternal(TextWriter tw, HttpRequest request);
210 internal IStateFormatter2 CreateStateFormatter();
211 private CultureInfo CultureFromUserLanguages(bool specific);
212 internal ICollection DecomposeViewStateIntoChunks();
213 internal static string DecryptString(string s, Purpose purpose);
214 [EditorBrowsable(EditorBrowsableState.Never)]
215 public void DesignerInitialize();
216 private bool DetermineIsExportingWebPart();
217 [EditorBrowsable(EditorBrowsableState.Advanced)]
218 protected internal virtual NameValueCollection DeterminePostBackMode();
219 [EditorBrowsable(EditorBrowsableState.Advanced)]
220 protected internal virtual NameValueCollection DeterminePostBackModeUnvalidated();
221 internal static string EncryptString(string s, Purpose purpose);
222 internal void EndFormRender(HtmlTextWriter writer, string formUniqueID);
223 internal void EndFormRenderArrayAndExpandoAttribute(HtmlTextWriter writer, string formUniqueID);
224 internal void EndFormRenderHiddenFields(HtmlTextWriter writer, string formUniqueID);
225 internal void EndFormRenderPostBackAndWebFormsScript(HtmlTextWriter writer, string formUniqueID);
226 public void ExecuteRegisteredAsyncTasks();
227 private void ExportWebPart(string exportedWebPartID);
228 public override Control FindControl(string id);
229 protected override void FrameworkInitialize();
230 internal NameValueCollection GetCollectionBasedOnMethod(bool dontReturnNull);
231 public object GetDataItem();
232 internal bool GetDesignModeInternal();
233 [Obsolete("The recommended alternative is ClientScript.GetPostBackEventReference. http://go.microsoft.com/fwlink/?linkid=14202"), EditorBrowsable(EditorBrowsableState.Advanced)]
234 public string GetPostBackClientEvent(Control control, string argument);
235 [EditorBrowsable(EditorBrowsableState.Advanced), Obsolete("The recommended alternative is ClientScript.GetPostBackClientHyperlink. http://go.microsoft.com/fwlink/?linkid=14202")]
236 public string GetPostBackClientHyperlink(Control control, string argument);
237 [Obsolete("The recommended alternative is ClientScript.GetPostBackEventReference. http://go.microsoft.com/fwlink/?linkid=14202"), EditorBrowsable(EditorBrowsableState.Advanced)]
238 public string GetPostBackEventReference(Control control);
239 [Obsolete("The recommended alternative is ClientScript.GetPostBackEventReference. http://go.microsoft.com/fwlink/?linkid=14202"), EditorBrowsable(EditorBrowsableState.Advanced)]
240 public string GetPostBackEventReference(Control control, string argument);
241 [EditorBrowsable(EditorBrowsableState.Never)]
242 public virtual int GetTypeHashCode();
243 internal override string GetUniqueIDPrefix();
244 public ValidatorCollection GetValidators(string validationGroup);
245 internal WithinCancellableCallbackTaskAwaitable GetWaitForPreviousStepCompletionAwaitable();
246 [EditorBrowsable(EditorBrowsableState.Never)]
247 protected object GetWrappedFileDependencies(string[] virtualFileDependencies);
248 private bool HandleError(Exception e);
249 protected virtual void InitializeCulture();
250 internal void InitializeStyleSheet();
251 private void InitializeThemes();
252 private void InitializeWriter(HtmlTextWriter writer);
253 [EditorBrowsable(EditorBrowsableState.Never)]
254 protected internal virtual void InitOutputCache(OutputCacheParameters cacheSettings);
255 [EditorBrowsable(EditorBrowsableState.Never), TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")]
256 protected virtual void InitOutputCache(int duration, string varyByHeader, string varyByCustom, OutputCacheLocation location, string varyByParam);
257 [EditorBrowsable(EditorBrowsableState.Never)]
258 protected virtual void InitOutputCache(int duration, string varyByContentEncoding, string varyByHeader, string varyByCustom, OutputCacheLocation location, string varyByParam);
259 [Obsolete("The recommended alternative is ClientScript.IsClientScriptBlockRegistered(string key). http://go.microsoft.com/fwlink/?linkid=14202")]
260 public bool IsClientScriptBlockRegistered(string key);
261 [Obsolete("The recommended alternative is ClientScript.IsStartupScriptRegistered(string key). http://go.microsoft.com/fwlink/?linkid=14202")]
262 public bool IsStartupScriptRegistered(string key);
263 internal static bool IsSystemPostField(string field);
264 private IAsyncResult LegacyAsyncPageBeginProcessRequest(HttpContext context, AsyncCallback callback, object extraData);
265 private void LegacyAsyncPageEndProcessRequest(IAsyncResult result);
266 private void LoadAllState();
267 [EditorBrowsable(EditorBrowsableState.Advanced)]
268 protected internal virtual object LoadPageStateFromPersistenceMedium();
269 internal void LoadScrollPosition();
270 public string MapPath(string virtualPath);
271 internal void OnFormPostRender(HtmlTextWriter writer);
272 internal void OnFormRender();
273 protected internal override void OnInit(EventArgs e);
274 protected virtual void OnInitComplete(EventArgs e);
275 protected virtual void OnLoadComplete(EventArgs e);
276 protected virtual void OnPreInit(EventArgs e);
277 protected virtual void OnPreLoad(EventArgs e);
278 protected virtual void OnPreRenderComplete(EventArgs e);
279 protected virtual void OnSaveStateComplete(EventArgs e);
280 private void PerformPreInit();
281 [DebuggerStepThrough, AsyncStateMachine(typeof(<PerformPreInitAsync>d__c))]
282 private Task PerformPreInitAsync();
283 private void PerformPreRenderComplete();
284 internal void PopCachingControl();
285 internal void PopDataBindingContext();
286 private void PrepareCallback(string callbackControlID);
287 [AsyncStateMachine(typeof(<PrepareCallbackAsync>d__1f)), DebuggerStepThrough]
288 private Task PrepareCallbackAsync(string callbackControlID);
289 private void ProcessPostData(NameValueCollection postData, bool fBeforeLoad);
290 private void ProcessRequest();
291 [EditorBrowsable(EditorBrowsableState.Never)]
292 public virtual void ProcessRequest(HttpContext context);
293 private void ProcessRequest(bool includeStagesBeforeAsyncPoint, bool includeStagesAfterAsyncPoint);
294 [AsyncStateMachine(typeof(<ProcessRequestAsync>d__2c)), DebuggerStepThrough]
295 private Task ProcessRequestAsync(HttpContext context);
296 [DebuggerStepThrough, AsyncStateMachine(typeof(<ProcessRequestAsync>d__10))]
297 private Task ProcessRequestAsync(bool includeStagesBeforeAsyncPoint, bool includeStagesAfterAsyncPoint);
298 private void ProcessRequestCleanup();
299 private void ProcessRequestEndTrace();
300 private void ProcessRequestMain();
301 private void ProcessRequestMain(bool includeStagesBeforeAsyncPoint, bool includeStagesAfterAsyncPoint);
302 [DebuggerStepThrough, AsyncStateMachine(typeof(<ProcessRequestMainAsync>d__14))]
303 private Task ProcessRequestMainAsync(bool includeStagesBeforeAsyncPoint, bool includeStagesAfterAsyncPoint);
304 private void ProcessRequestTransacted();
305 [PermissionSet(SecurityAction.Assert, Unrestricted=true)]
306 private void ProcessRequestWithAssert(HttpContext context);
307 private void ProcessRequestWithNoAssert(HttpContext context);
308 internal void PushCachingControl(BasePartialCachingControl c);
309 internal void PushDataBindingContext(object dataItem);
310 internal void RaiseChangedEvents();
311 [DebuggerStepThrough, AsyncStateMachine(typeof(<RaiseChangedEventsAsync>d__5))]
312 internal Task RaiseChangedEventsAsync();
313 private void RaisePostBackEvent(NameValueCollection postData);
314 [EditorBrowsable(EditorBrowsableState.Advanced)]
315 protected virtual void RaisePostBackEvent(IPostBackEventHandler sourceControl, string eventArgument);
316 [Obsolete("The recommended alternative is ClientScript.RegisterArrayDeclaration(string arrayName, string arrayValue). http://go.microsoft.com/fwlink/?linkid=14202"), EditorBrowsable(EditorBrowsableState.Advanced)]
317 public void RegisterArrayDeclaration(string arrayName, string arrayValue);
318 public void RegisterAsyncTask(PageAsyncTask task);
319 [Obsolete("The recommended alternative is ClientScript.RegisterClientScriptBlock(Type type, string key, string script). http://go.microsoft.com/fwlink/?linkid=14202"), EditorBrowsable(EditorBrowsableState.Advanced)]
320 public virtual void RegisterClientScriptBlock(string key, string script);
321 internal void RegisterEnabledControl(Control control);
322 internal void RegisterFocusScript();
323 [EditorBrowsable(EditorBrowsableState.Advanced), Obsolete("The recommended alternative is ClientScript.RegisterHiddenField(string hiddenFieldName, string hiddenFieldInitialValue). http://go.microsoft.com/fwlink/?linkid=14202")]
324 public virtual void RegisterHiddenField(string hiddenFieldName, string hiddenFieldInitialValue);
325 [Obsolete("The recommended alternative is ClientScript.RegisterOnSubmitStatement(Type type, string key, string script). http://go.microsoft.com/fwlink/?linkid=14202"), EditorBrowsable(EditorBrowsableState.Advanced)]
326 public void RegisterOnSubmitStatement(string key, string script);
327 internal void RegisterPostBackScript();
328 internal void RegisterRequiresClearChildControlState(Control control);
329 [EditorBrowsable(EditorBrowsableState.Advanced)]
330 public void RegisterRequiresControlState(Control control);
331 [EditorBrowsable(EditorBrowsableState.Advanced)]
332 public void RegisterRequiresPostBack(Control control);
333 [EditorBrowsable(EditorBrowsableState.Advanced)]
334 public virtual void RegisterRequiresRaiseEvent(IPostBackEventHandler control);
335 public void RegisterRequiresViewStateEncryption();
336 [EditorBrowsable(EditorBrowsableState.Advanced), Obsolete("The recommended alternative is ClientScript.RegisterStartupScript(Type type, string key, string script). http://go.microsoft.com/fwlink/?linkid=14202")]
337 public virtual void RegisterStartupScript(string key, string script);
338 [EditorBrowsable(EditorBrowsableState.Advanced)]
339 public void RegisterViewStateHandler();
340 internal void RegisterWebFormsScript();
341 protected internal override void Render(HtmlTextWriter writer);
342 private void RenderCallback();
343 private bool RenderDivAroundHiddenInputs(HtmlTextWriter writer);
344 private void RenderPostBackScript(HtmlTextWriter writer, string formUniqueID);
345 internal void RenderViewStateFields(HtmlTextWriter writer);
346 private void RenderWebFormsScript(HtmlTextWriter writer);
347 public bool RequiresControlState(Control control);
348 internal void ResetOnFormRenderCalled();
349 private void RestoreCultures(Thread currentThread, CultureInfo prevCulture, CultureInfo prevUICulture);
350 private void SaveAllState();
351 [EditorBrowsable(EditorBrowsableState.Advanced)]
352 protected internal virtual void SavePageStateToPersistenceMedium(object state);
353 internal void SetActiveValueProvider(IValueProvider valueProvider);
354 private void SetCulture(Thread currentThread, CultureInfo currentCulture, CultureInfo currentUICulture);
355 [SecurityPermission(SecurityAction.Assert, ControlThread=true)]
356 private void SetCultureWithAssert(Thread currentThread, CultureInfo currentCulture, CultureInfo currentUICulture);
357 public void SetFocus(string clientID);
358 public void SetFocus(Control control);
359 internal void SetForm(HtmlForm form);
360 internal void SetHeader(HtmlHead header);
361 private void SetIntrinsics(HttpContext context);
362 private void SetIntrinsics(HttpContext context, bool allowAsync);
363 internal void SetPostFormRenderDelegate(RenderMethod renderMethod);
364 internal void SetPreviousPage(Page previousPage);
365 internal void SetValidatorInvalidControlFocus(string clientID);
366 internal bool ShouldLoadControlState(Control control);
367 [SecurityPermission(SecurityAction.Assert, ControlThread=true)]
368 internal static void ThreadResetAbortWithAssert();
369 public virtual bool TryUpdateModel<TModel>(TModel model) where TModel: class;
370 public virtual bool TryUpdateModel<TModel>(TModel model, IValueProvider valueProvider) where TModel: class;
371 internal override void UnloadRecursive(bool dispose);
372 [EditorBrowsable(EditorBrowsableState.Advanced)]
373 public void UnregisterRequiresControlState(Control control);
374 public virtual void UpdateModel<TModel>(TModel model) where TModel: class;
375 public virtual void UpdateModel<TModel>(TModel model, IValueProvider valueProvider) where TModel: class;
376 public virtual void Validate();
377 public virtual void Validate(string validationGroup);
378 private void ValidateRawUrlIfRequired();
379 [EditorBrowsable(EditorBrowsableState.Advanced)]
380 public virtual void VerifyRenderingInServerForm(Control control);
381
382 // Properties
383 private IValueProvider ActiveValueProvider { [CompilerGenerated, TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; [CompilerGenerated] set; }
384 [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
385 public HttpApplicationState Application { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; }
386 [EditorBrowsable(EditorBrowsableState.Never)]
387 protected bool AspCompatMode { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] set; }
388 [EditorBrowsable(EditorBrowsableState.Never)]
389 protected bool AsyncMode { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] set; }
390 [Browsable(false), EditorBrowsable(EditorBrowsableState.Advanced), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
391 public TimeSpan AsyncTimeout { get; set; }
392 public Control AutoPostBackControl { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] set; }
393 [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
394 public bool Buffer { get; set; }
395 [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(false)]
396 public Cache Cache { get; }
397 internal string ClientOnSubmitEvent { get; }
398 public string ClientQueryString { get; }
399 public ClientScriptManager ClientScript { get; }
400 internal string ClientState { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] set; }
401 internal bool ClientSupportsFocus { get; }
402 internal bool ClientSupportsJavaScript { get; }
403 [WebSysDescription("Page_ClientTarget"), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), DefaultValue(""), Browsable(false), EditorBrowsable(EditorBrowsableState.Advanced)]
404 public string ClientTarget { get; set; }
405 [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
406 public int CodePage { get; set; }
407 internal bool ContainsCrossPagePost { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] set; }
408 internal bool ContainsEncryptedViewState { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] set; }
409 internal bool ContainsTheme { get; }
410 [EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(false)]
411 public string ContentType { get; set; }
412 protected internal override HttpContext Context { [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")] get; }
413 private StringSet ControlStateLoadedControlIds { get; }
414 [Browsable(false), EditorBrowsable(EditorBrowsableState.Advanced), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
415 public string Culture { get; set; }
416 internal CultureInfo DynamicCulture { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; }
417 internal CultureInfo DynamicUICulture { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; }
418 private ArrayList EnabledControls { get; }
419 [DefaultValue(true), Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), EditorBrowsable(EditorBrowsableState.Never)]
420 public virtual bool EnableEventValidation { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; set; }
421 [Browsable(false)]
422 public override bool EnableViewState { get; set; }
423 [EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(false)]
424 public bool EnableViewStateMac { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; set; }
425 [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(false), WebSysDescription("Page_ErrorPage"), DefaultValue("")]
426 public string ErrorPage { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] set; }
427 [Obsolete("The recommended alternative is HttpResponse.AddFileDependencies. http://go.microsoft.com/fwlink/?linkid=14202"), EditorBrowsable(EditorBrowsableState.Never)]
428 protected ArrayList FileDependencies { set; }
429 internal Control FocusedControl { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; }
430 internal string FocusedControlID { get; }
431 public HtmlForm Form { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; }
432 [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
433 public HtmlHead Header { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; }
434 [EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
435 public override string ID { get; set; }
436 [EditorBrowsable(EditorBrowsableState.Never), Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
437 public virtual char IdSeparator { get; }
438 public bool IsAsync { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; }
439 [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(false)]
440 public bool IsCallback { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; }
441 [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
442 public bool IsCrossPagePostBack { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; }
443 internal bool IsExportingWebPart { get; }
444 internal bool IsExportingWebPartShared { get; }
445 internal bool IsInAspCompatMode { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; }
446 internal bool IsInOnFormRender { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; }
447 internal bool IsPartialRenderingSupported { get; }
448 [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
449 public bool IsPostBack { get; }
450 public bool IsPostBackEventControlRegistered { get; }
451 [EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
452 public bool IsReusable { get; }
453 internal bool IsTransacted { get; }
454 [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
455 public bool IsValid { get; }
456 [Browsable(false)]
457 public IDictionary Items { get; }
458 internal string LastFocusedControl { [AspNetHostingPermission(SecurityAction.Assert, Level=AspNetHostingPermissionLevel.Low)] get; }
459 [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
460 public int LCID { get; set; }
461 [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(false)]
462 public bool MaintainScrollPositionOnPostBack { get; set; }
463 [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), WebSysDescription("MasterPage_MasterPage"), Browsable(false)]
464 public MasterPage Master { get; }
465 [WebSysDescription("MasterPage_MasterPageFile"), DefaultValue(""), WebCategory("Behavior")]
466 public virtual string MasterPageFile { get; set; }
467 [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(false), EditorBrowsable(EditorBrowsableState.Never)]
468 public int MaxPageStateFieldLength { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; set; }
469 [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Bindable(true), Localizable(true)]
470 public string MetaDescription { get; set; }
471 [Localizable(true), Bindable(true), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
472 public string MetaKeywords { get; set; }
473 public ModelBindingExecutionContext ModelBindingExecutionContext { get; }
474 public ModelStateDictionary ModelState { get; }
475 public PageAdapter PageAdapter { get; }
476 protected virtual PageStatePersister PageStatePersister { get; }
477 internal Stack PartialCachingControlStack { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; }
478 [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(false)]
479 public Page PreviousPage { get; }
480 internal string RelativeFilePath { get; }
481 private bool RenderDisabledControlsScript { get; }
482 internal bool RenderFocusScript { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; }
483 [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(false)]
484 public HttpRequest Request { [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")] get; }
485 internal HttpRequest RequestInternal { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; }
486 internal NameValueCollection RequestValueCollection { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; }
487 internal string RequestViewStateString { get; }
488 internal bool RequiresViewStateEncryptionInternal { get; }
489 [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
490 public HttpResponse Response { get; }
491 [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), EditorBrowsable(EditorBrowsableState.Never), Browsable(false)]
492 public string ResponseEncoding { get; set; }
493 [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
494 public RouteData RouteData { get; }
495 internal IScriptManager ScriptManager { get; }
496 internal Type ScriptManagerType { get; set; }
497 [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(false)]
498 public HttpServerUtility Server { get; }
499 [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
500 public virtual HttpSessionState Session { get; }
501 [EditorBrowsable(EditorBrowsableState.Never), Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), DefaultValue(false)]
502 public bool SkipFormActionValidation { get; set; }
503 [Filterable(false), Browsable(false), Obsolete("The recommended alternative is Page.SetFocus and Page.MaintainScrollPositionOnPostBack. http://go.microsoft.com/fwlink/?linkid=14202")]
504 public bool SmartNavigation { get; set; }
505 [Filterable(false), Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
506 public virtual string StyleSheetTheme { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; set; }
507 internal bool SupportsStyleSheets { get; }
508 [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(false)]
509 public virtual string Theme { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; set; }
510 [Bindable(true), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Localizable(true)]
511 public string Title { get; set; }
512 [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
513 public TraceContext Trace { get; }
514 [EditorBrowsable(EditorBrowsableState.Never), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(false)]
515 public bool TraceEnabled { get; set; }
516 [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), EditorBrowsable(EditorBrowsableState.Never)]
517 public TraceMode TraceModeValue { get; set; }
518 [EditorBrowsable(EditorBrowsableState.Never)]
519 protected int TransactionMode { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] set; }
520 [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), EditorBrowsable(EditorBrowsableState.Advanced), Browsable(false)]
521 public string UICulture { get; set; }
522 protected internal virtual string UniqueFilePathSuffix { get; }
523 [WebSysDescription("Page_UnobtrusiveValidationMode"), DefaultValue(0), WebCategory("Behavior")]
524 public UnobtrusiveValidationMode UnobtrusiveValidationMode { get; set; }
525 [DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), Browsable(false)]
526 public IPrincipal User { get; }
527 [EditorBrowsable(EditorBrowsableState.Never), Browsable(false), DefaultValue(2)]
528 public override ValidateRequestMode ValidateRequestMode { get; set; }
529 internal string ValidatorInvalidControl { get; }
530 [Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
531 public ValidatorCollection Validators { get; }
532 [Browsable(false), DefaultValue(0), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden), EditorBrowsable(EditorBrowsableState.Never)]
533 public ViewStateEncryptionMode ViewStateEncryptionMode { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; set; }
534 [Browsable(false)]
535 public string ViewStateUserKey { [TargetedPatchingOptOut("Performance critical to inline this type of method across NGen image boundaries")] get; set; }
536 [Browsable(false)]
537 public override bool Visible { [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")] get; set; }
538 internal XhtmlConformanceMode XhtmlConformanceMode { get; }
539
540 // Nested Types
541 [CompilerGenerated]
542 private struct <PerformPreInitAsync>d__c : IAsyncStateMachine
543 {
544 // Fields
545 public int <>1__state;
546 public Page <>4__this;
547 public IDisposable <>7__wrapd;
548 public AsyncTaskMethodBuilder <>t__builder;
549 private object <>t__stack;
550 private WithinCancellableCallbackTaskAwaitable.WithinCancellableCallbackTaskAwaiter <>u__$awaitere;
551
552 // Methods
553 private void MoveNext();
554 [DebuggerHidden]
555 private void SetStateMachine(IAsyncStateMachine param0);
556 }
557
558 [CompilerGenerated]
559 private struct <PrepareCallbackAsync>d__1f : IAsyncStateMachine
560 {
561 // Fields
562 public int <>1__state;
563 public Page <>4__this;
564 public IDisposable <>7__wrap21;
565 public AsyncTaskMethodBuilder <>t__builder;
566 private object <>t__stack;
567 private WithinCancellableCallbackTaskAwaitable.WithinCancellableCallbackTaskAwaiter <>u__$awaiter22;
568 public string <param>5__20;
569 public string callbackControlID;
570
571 // Methods
572 private void MoveNext();
573 [DebuggerHidden]
574 private void SetStateMachine(IAsyncStateMachine param0);
575 }
576
577 [CompilerGenerated]
578 private struct <ProcessRequestAsync>d__10 : IAsyncStateMachine
579 {
580 // Fields
581 public int <>1__state;
582 public Page <>4__this;
583 public AsyncTaskMethodBuilder <>t__builder;
584 private object <>t__stack;
585 private WithinCancellableCallbackTaskAwaitable.WithinCancellableCallbackTaskAwaiter <>u__$awaiter12;
586 public bool <needToCallEndTrace>5__11;
587 public bool includeStagesAfterAsyncPoint;
588 public bool includeStagesBeforeAsyncPoint;
589
590 // Methods
591 private void MoveNext();
592 [DebuggerHidden]
593 private void SetStateMachine(IAsyncStateMachine param0);
594 }
595
596 [CompilerGenerated]
597 private struct <ProcessRequestAsync>d__2c : IAsyncStateMachine
598 {
599 // Fields
600 public int <>1__state;
601 public Page <>4__this;
602 public AsyncTaskMethodBuilder <>t__builder;
603 private object <>t__stack;
604 private TaskAwaiter <>u__$awaiter2f;
605 public CancellationToken <cancellationToken>5__2e;
606 public CancellationTokenSource <cancellationTokenSource>5__2d;
607 public HttpContext context;
608 public Page.<>c__DisplayClass2a CS$<>8__locals2b;
609
610 // Methods
611 private void MoveNext();
612 [DebuggerHidden]
613 private void SetStateMachine(IAsyncStateMachine param0);
614 }
615
616 [CompilerGenerated]
617 private struct <ProcessRequestMainAsync>d__14 : IAsyncStateMachine
618 {
619 // Fields
620 public int <>1__state;
621 public Page <>4__this;
622 public IDisposable <>7__wrap1a;
623 public IDisposable <>7__wrap1b;
624 public IDisposable <>7__wrap1c;
625 public IDisposable <>7__wrap1d;
626 public AsyncTaskMethodBuilder <>t__builder;
627 private object <>t__stack;
628 private WithinCancellableCallbackTaskAwaitable.WithinCancellableCallbackTaskAwaiter <>u__$awaiter19;
629 public string <callbackControlId>5__17;
630 public HttpContext <con>5__15;
631 public string <exportedWebPartID>5__16;
632 public Task <initRecursiveTask>5__18;
633 public bool includeStagesAfterAsyncPoint;
634 public bool includeStagesBeforeAsyncPoint;
635
636 // Methods
637 private void MoveNext();
638 [DebuggerHidden]
639 private void SetStateMachine(IAsyncStateMachine param0);
640 }
641
642 [CompilerGenerated]
643 private struct <RaiseChangedEventsAsync>d__5 : IAsyncStateMachine
644 {
645 // Fields
646 public int <>1__state;
647 public Page <>4__this;
648 public IDisposable <>7__wrap9;
649 public AsyncTaskMethodBuilder <>t__builder;
650 private object <>t__stack;
651 private WithinCancellableCallbackTaskAwaitable.WithinCancellableCallbackTaskAwaiter <>u__$awaitera;
652 public Control <c>5__7;
653 public IPostBackDataHandler <changedPostDataConsumer>5__8;
654 public int <i>5__6;
655
656 // Methods
657 private void MoveNext();
658 [DebuggerHidden]
659 private void SetStateMachine(IAsyncStateMachine param0);
660 }
661
662 private class LegacyPageAsyncInfo
663 {
664 // Fields
665 private HttpApplication _app;
666 private bool _asyncPointReached;
667 private HttpAsyncResult _asyncResult;
668 private ArrayList _beginHandlers;
669 private bool _callerIsBlocking;
670 private WaitCallback _callHandlersThreadpoolCallback;
671 private bool _completed;
672 private AsyncCallback _completionCallback;
673 private int _currentHandler;
674 private ArrayList _endHandlers;
675 private Exception _error;
676 private int _handlerCount;
677 private Page _page;
678 private ArrayList _stateObjects;
679 private AspNetSynchronizationContextBase _syncContext;
680
681 // Methods
682 internal LegacyPageAsyncInfo(Page page);
683 internal void AddHandler(BeginEventHandler beginHandler, EndEventHandler endHandler, object state);
684 internal void CallHandlers(bool onPageThread);
685 private void CallHandlersFromThreadpoolThread(object data);
686 private void CallHandlersPossiblyUnderLock(bool onPageThread);
687 private void OnAsyncHandlerCompletion(IAsyncResult ar);
688 internal void SetError(Exception error);
689
690 // Properties
691 internal bool AsyncPointReached { get; set; }
692 internal HttpAsyncResult AsyncResult { get; set; }
693 internal bool CallerIsBlocking { get; set; }
694 }
695 }
696
697
698 Expand Methods
699