为什么LoadPostData 执行不了, why the LoadPostData method was not be implement


发现
没有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);
            }

        }


我们也注册一下这个事情就可以了
then we register the event also.

原文地址:https://www.cnblogs.com/lovebanyi/p/1166057.html