发现
没有post回来的没有机会执行。
多个name相同的也不行, More input element have one name ( the same name)
哪为什么radiobutton可以执行到这个方法呢。,but we can see the raidobutton have the same name also
原来是在 page哪边注册了回调事件, because the radiobutton control is register the event on OnPreRender method.
protected override void OnPreRender(EventArgs e)
{
base.OnPreRender(e);
if (this.Page != null && this.Enabled)
{
this.Page.RegisterRequiresPostBack(this);
}
}
{
base.OnPreRender(e);
if (this.Page != null && this.Enabled)
{
this.Page.RegisterRequiresPostBack(this);
}
}
我们也注册一下这个事情就可以了
then we register the event also.