Hi KulerMaster,
You could manually register control for event validation within Render method of the page:
protected override void Render(HtmlTextWriter writer)
{
ClientScript.RegisterForEventValidation(myButton.UniqueID.ToString());
base.Render(writer);
}Or make sure that controls are not re-created on every postback (rebind here). Using Page property IsPostback can easily handle it. If you want to create a control on every postback, then it is necessary to make sure that the IDs are not changed:
protected void Page_Load(object sender, EventArgs e)
{
if(!Page.IsPostback)
{
// Create controls
// Bind
}
}For more information, please see: http://www.codeproject.com/Articles/534761/e-cInvalidpluspostbackplusorpluscallbackplusa
Best Regards,
Candice Zhou