📄 htmlinputhidden.cs
字号:
using System;
using System.Web.UI;
using System.Globalization;
using System.Collections.Specialized;
namespace System.Web.UI.HtmlControls
{
/// <summary>
/// Summary description for HtmlInputHidden.
/// </summary>
//.custom instance void [System]System.ComponentModel.DefaultEventAttribute:
public class HtmlInputHidden : HtmlInputControl,IPostBackDataHandler
{
private static object EventServerChange;
static HtmlInputHidden()
{
HtmlInputHidden.EventServerChange = new Object();
}
public HtmlInputHidden() : base("hidden")
{
}
protected virtual void OnPreRender(EventArgs e)
{
if ((this.Events[HtmlInputHidden.EventServerChange]== null) && !(this.Disabled))
this.ViewState.SetItemDirty("value", false);
}
protected virtual void OnServerChange(EventArgs e)
{
EventHandler local0;
local0 = (EventHandler) this.Events[HtmlInputHidden.EventServerChange];
if (local0 != null)
local0.Invoke(this, e);
}
bool System.Web.UI.IPostBackDataHandler.LoadPostData(string postDataKey, NameValueCollection postCollection)
{
string local0;
string local1;
local0 = this.Value;
local1 = postCollection.GetValues(postDataKey)[0];
if (local0 != local1)
{
this.Value = local1;
return true;
}
return false;
}
void System.Web.UI.IPostBackDataHandler.RaisePostDataChangedEvent()
{
this.OnServerChange(System.EventArgs.Empty);
}
public event EventHandler ServerChange
{
add
{
this.Events.AddHandler(HtmlInputHidden.EventServerChange, value);
}
remove
{
this.Events.RemoveHandler(HtmlInputHidden.EventServerChange, value);
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -