在很多时候。我门需要一种页面。这种页面不需要回送。为了速度。不需要使用服务器控件。必须保持高响应。他只要做动态显示。有不能做成静态页面。比如一些vip的文章显示。投票查看了。
webform框价功能强大。但是看看一个system.web.ui.page的源码。
[ToolboxItem(false), DesignerSerializer("Microsoft.VisualStudio.Web.WebForms.WebFormCodeDomSerializer, Microsoft.VisualStudio.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", "System.ComponentModel.Design.Serialization.TypeCodeDomSerializer, System.Design, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"), DefaultEvent("Load"), Designer("Microsoft.VisualStudio.Web.WebForms.WebFormDesigner, Microsoft.VisualStudio.Web, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a", typeof(IRootDesigner)), DesignerCategory("ASPXCodeBehind"), AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal), AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public class Page : TemplateControl, IHttpHandler
{
// Events
[EditorBrowsable(EditorBrowsableState.Advanced)]
public event EventHandler InitComplete;
[EditorBrowsable(EditorBrowsableState.Advanced)]
public event EventHandler LoadComplete;
public event EventHandler PreInit;
[EditorBrowsable(EditorBrowsableState.Advanced)]
public event EventHandler PreLoad;
[EditorBrowsable(EditorBrowsableState.Advanced)]
public event EventHandler PreRenderComplete;
[EditorBrowsable(EditorBrowsableState.Advanced)]
public event EventHandler SaveStateComplete;
// Methods
static Page();
public Page();
[EditorBrowsable(EditorBrowsableState.Never)]
protected internal void AddContentTemplate(string templateName, ITemplate template);
public void AddOnPreRenderCompleteAsync(BeginEventHandler beginHandler, EndEventHandler endHandler);
public void AddOnPreRenderCompleteAsync(BeginEventHandler beginHandler, EndEventHandler endHandler, object state);
[EditorBrowsable(EditorBrowsableState.Never)]
protected internal void AddWrappedFileDependencies(object virtualFileDependencies);
internal void ApplyControlSkin(Control ctrl);
internal bool ApplyControlStyleSheet(Control ctrl);
private void ApplyMasterPage();
[EditorBrowsable(EditorBrowsableState.Never)]
protected IAsyncResult AspCompatBeginProcessRequest(HttpContext context, AsyncCallback cb, object extraData);
[EditorBrowsable(EditorBrowsableState.Never)]
protected void AspCompatEndProcessRequest(IAsyncResult result);
[EditorBrowsable(EditorBrowsableState.Never)]
protected IAsyncResult AsyncPageBeginProcessRequest(HttpContext context, AsyncCallback callback, object extraData);
[EditorBrowsable(EditorBrowsableState.Never)]
protected void AsyncPageEndProcessRequest(IAsyncResult result);
private void AsyncPageProcessRequestBeforeAsyncPointCancellableCallback(object state);
internal void BeginFormRender(HtmlTextWriter writer, string formUniqueID);
private void BuildPageProfileTree(bool enableViewState);
private void CheckRemainingAsyncTasks();
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected internal virtual HtmlTextWriter CreateHtmlTextWriter(TextWriter tw);
public static HtmlTextWriter CreateHtmlTextWriterFromType(TextWriter tw, Type writerType);
internal static HtmlTextWriter CreateHtmlTextWriterInternal(TextWriter tw, HttpRequest request);
internal IStateFormatter CreateStateFormatter();
private CultureInfo CultureFromUserLanguages(bool specific);
internal ICollection DecomposeViewStateIntoChunks();
internal static string DecryptString(string s);
[EditorBrowsable(EditorBrowsableState.Never)]
public void DesignerInitialize();
private bool DetermineIsExportingWebPart();
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected internal virtual NameValueCollection DeterminePostBackMode();
internal static string EncryptString(string s);
internal void EndFormRender(HtmlTextWriter writer, string formUniqueID);
public void ExecuteRegisteredAsyncTasks();
private void ExportWebPart(string exportedWebPartID);
public override Control FindControl(string id);
protected override void FrameworkInitialize();
internal NameValueCollection GetCollectionBasedOnMethod(bool dontReturnNull);
public object GetDataItem();
internal bool GetDesignModeInternal();
[EditorBrowsable(EditorBrowsableState.Advanced), Obsolete("The recommended alternative is ClientScript.GetPostBackEventReference. http://go.microsoft.com/fwlink/?linkid=14202")]
public string GetPostBackClientEvent(Control control, string argument);
[EditorBrowsable(EditorBrowsableState.Advanced), Obsolete("The recommended alternative is ClientScript.GetPostBackClientHyperlink. http://go.microsoft.com/fwlink/?linkid=14202")]
public string GetPostBackClientHyperlink(Control control, string argument);
[Obsolete("The recommended alternative is ClientScript.GetPostBackEventReference. http://go.microsoft.com/fwlink/?linkid=14202"), EditorBrowsable(EditorBrowsableState.Advanced)]
public string GetPostBackEventReference(Control control);
[Obsolete("The recommended alternative is ClientScript.GetPostBackEventReference. http://go.microsoft.com/fwlink/?linkid=14202"), EditorBrowsable(EditorBrowsableState.Advanced)]
public string GetPostBackEventReference(Control control, string argument);
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual int GetTypeHashCode();
internal override string GetUniqueIDPrefix();
public ValidatorCollection GetValidators(string validationGroup);
[EditorBrowsable(EditorBrowsableState.Never)]
protected object GetWrappedFileDependencies(string[] virtualFileDependencies);
private bool HandleError(Exception e);
protected virtual void InitializeCulture();
internal void InitializeStyleSheet();
private void InitializeThemes();
private void InitializeWriter(HtmlTextWriter writer);
[EditorBrowsable(EditorBrowsableState.Never)]
protected internal virtual void InitOutputCache(OutputCacheParameters cacheSettings);
[EditorBrowsable(EditorBrowsableState.Never)]
protected virtual void InitOutputCache(int duration, string varyByHeader, string varyByCustom, OutputCacheLocation location, string varyByParam);
[Obsolete("The recommended alternative is ClientScript.IsClientScriptBlockRegistered(string key). http://go.microsoft.com/fwlink/?linkid=14202")]
public bool IsClientScriptBlockRegistered(string key);
[Obsolete("The recommended alternative is ClientScript.IsStartupScriptRegistered(string key). http://go.microsoft.com/fwlink/?linkid=14202")]
public bool IsStartupScriptRegistered(string key);
internal static bool IsSystemPostField(string field);
private void LoadAllState();
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected internal virtual object LoadPageStateFromPersistenceMedium();
internal void LoadScrollPosition();
public string MapPath(string virtualPath);
internal void OnFormPostRender();
internal void OnFormRender();
protected internal override void OnInit(EventArgs e);
protected virtual void OnInitComplete(EventArgs e);
protected virtual void OnLoadComplete(EventArgs e);
protected virtual void OnPreInit(EventArgs e);
protected virtual void OnPreLoad(EventArgs e);
protected virtual void OnPreRenderComplete(EventArgs e);
protected virtual void OnSaveStateComplete(EventArgs e);
private void PerformPreInit();
private void PerformPreRenderComplete();
internal void PopCachingControl();
internal void PopDataBindingContext();
private void PrepareCallback(string callbackControlID);
private void ProcessPostData(NameValueCollection postData, bool fBeforeLoad);
private void ProcessRequest();
[EditorBrowsable(EditorBrowsableState.Never)]
public virtual void ProcessRequest(HttpContext context);
private void ProcessRequest(bool includeStagesBeforeAsyncPoint, bool includeStagesAfterAsyncPoint);
private void ProcessRequestCleanup();
private void ProcessRequestEndTrace();
private void ProcessRequestMain();
private void ProcessRequestMain(bool includeStagesBeforeAsyncPoint, bool includeStagesAfterAsyncPoint);
private void ProcessRequestTransacted();
[PermissionSet(SecurityAction.Assert, Unrestricted=true)]
private void ProcessRequestWithAssert(HttpContext context);
private void ProcessRequestWithNoAssert(HttpContext context);
internal void PushCachingControl(BasePartialCachingControl c);
internal void PushDataBindingContext(object dataItem);
internal void RaiseChangedEvents();
private void RaisePostBackEvent(NameValueCollection postData);
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected virtual void RaisePostBackEvent(IPostBackEventHandler sourceControl, string eventArgument);
[Obsolete("The recommended alternative is ClientScript.RegisterArrayDeclaration(string arrayName, string arrayValue). http://go.microsoft.com/fwlink/?linkid=14202"), EditorBrowsable(EditorBrowsableState.Advanced)]
public void RegisterArrayDeclaration(string arrayName, string arrayValue);
public void RegisterAsyncTask(PageAsyncTask task);
[Obsolete("The recommended alternative is ClientScript.RegisterClientScriptBlock(Type type, string key, string script). http://go.microsoft.com/fwlink/?linkid=14202"), EditorBrowsable(EditorBrowsableState.Advanced)]
public virtual void RegisterClientScriptBlock(string key, string script);
internal void RegisterEnabledControl(Control control);
internal void RegisterFocusScript();
[EditorBrowsable(EditorBrowsableState.Advanced), Obsolete("The recommended alternative is ClientScript.RegisterHiddenField(string hiddenFieldName, string hiddenFieldInitialValue). http://go.microsoft.com/fwlink/?linkid=14202")]
public virtual void RegisterHiddenField(string hiddenFieldName, string hiddenFieldInitialValue);
[EditorBrowsable(EditorBrowsableState.Advanced), Obsolete("The recommended alternative is ClientScript.RegisterOnSubmitStatement(Type type, string key, string script). http://go.microsoft.com/fwlink/?linkid=14202")]
public void RegisterOnSubmitStatement(string key, string script);
internal void RegisterPostBackScript();
internal void RegisterRequiresClearChildControlState(Control control);
[EditorBrowsable(EditorBrowsableState.Advanced)]
public void RegisterRequiresControlState(Control control);
[EditorBrowsable(EditorBrowsableState.Advanced)]
public void RegisterRequiresPostBack(Control control);
[EditorBrowsable(EditorBrowsableState.Advanced)]
public virtual void RegisterRequiresRaiseEvent(IPostBackEventHandler control);
public void RegisterRequiresViewStateEncryption();
[Obsolete("The recommended alternative is ClientScript.RegisterStartupScript(Type type, string key, string script). http://go.microsoft.com/fwlink/?linkid=14202"), EditorBrowsable(EditorBrowsableState.Advanced)]
public virtual void RegisterStartupScript(string key, string script);
[EditorBrowsable(EditorBrowsableState.Advanced)]
public void RegisterViewStateHandler();
internal void RegisterWebFormsScript();
protected internal override void Render(HtmlTextWriter writer);
private void RenderCallback();
private void RenderPostBackScript(HtmlTextWriter writer, string formUniqueID);
internal void RenderViewStateFields(HtmlTextWriter writer);
private void RenderWebFormsScript(HtmlTextWriter writer);
public bool RequiresControlState(Control control);
internal void ResetOnFormRenderCalled();
private void RestoreCultures(Thread currentThread, CultureInfo prevCulture, CultureInfo prevUICulture);
private void SaveAllState();
[EditorBrowsable(EditorBrowsableState.Advanced)]
protected internal virtual void SavePageStateToPersistenceMedium(object state);
private void SetCulture(Thread currentThread, CultureInfo currentCulture, CultureInfo currentUICulture);
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal), SecurityPermission(SecurityAction.Assert, ControlThread=true)]
private void SetCultureWithAssert(Thread currentThread, CultureInfo currentCulture, CultureInfo currentUICulture);
public void SetFocus(string clientID);
public void SetFocus(Control control);
internal void SetForm(HtmlForm form);
internal void SetHeader(HtmlHead header);
private void SetIntrinsics(HttpContext context);
private void SetIntrinsics(HttpContext context, bool allowAsync);
internal void SetPreviousPage(Page previousPage);
internal void SetValidatorInvalidControlFocus(string clientID);
internal bool ShouldLoadControlState(Control control);
internal override void UnloadRecursive(bool dispose);
[EditorBrowsable(EditorBrowsableState.Advanced)]
public void UnregisterRequiresControlState(Control control);
public virtual void Validate();
public virtual void Validate(string validationGroup);
[EditorBrowsable(EditorBrowsableState.Advanced)]
public virtual void VerifyRenderingInServerForm(Control control);
// Properties
[Browsable(false), DesignerSerializationVisibility(DesignerSerializationVisibility.Hidden)]
public HttpApplicationState Application { get; }
[EditorBrowsable(EditorBrowsableState.Never)]
protected bool AspCompatMode { get; set; }
[EditorBrowsable(EditorBrowsableState.Never)]
protected bool AsyncMode