#endif
public class HtmlInputHidden : HtmlInputControl, IPostBackDataHandler {
- private static readonly object ServerChangeEvent = new object ();
+ static readonly object ServerChangeEvent = new object ();
public HtmlInputHidden () : base ("hidden")
{
{
string data = postCollection [postDataKey];
if (data != null && data != Value) {
+#if NET_2_0
+ ValidateEvent (postDataKey, String.Empty);
+#endif
Value = data;
return true;
}
#if NET_2_0
protected override void RenderAttributes (HtmlTextWriter writer)
{
- if (Page != null)
- Page.ClientScript.RegisterForEventValidation (this.UniqueID);
+ Page page = Page;
+ if (page != null)
+ page.ClientScript.RegisterForEventValidation (Name);
base.RenderAttributes (writer);
}
{
base.OnPreRender (e);
- if (Page != null) {
+ if (Page != null && !Disabled) {
Page.RegisterRequiresPostBack (this);
+#if NET_2_0
+ Page.RegisterEnabledControl (this);
+#endif
}
}