Quantcast
Channel: Invalid postback or callback argument
Viewing all articles
Browse latest Browse all 10

Re: Invalid postback or callback argument

$
0
0

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


Viewing all articles
Browse latest Browse all 10

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>