Note that there are some explanatory texts on larger screens.

plurals
  1. POInvalid postback or callback argument on user control
    text
    copied!<p>This is the error:</p> <pre><code>Invalid postback or callback argument. Event validation is enabled using &lt;pages enableEventValidation="true"/&gt; in configuration or &lt;%@ Page EnableEventValidation="true" %&gt; in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation. </code></pre> <p>And this is what I'm doing:</p> <p>aspx:</p> <pre><code>protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { myUserControl.DataBind(); } } </code></pre> <p>usercontrol:</p> <pre><code> public override void DataBind() { ddlContacts.DataSource = SessionHandler.Contacts; ddlContacts.DataValueField = "Id"; ddlContacts.DataTextField = "Name"; ddlContacts.DataBind(); ddlOrderbillto.DataSource = SessionHandler.Contacts; ddlOrderbillto.DataValueField = "Id"; ddlOrderbillto.DataTextField = "Name"; ddlOrderbillto.DataBind(); ddlState.DataSource = SessionHandler.FederalStates; ddlState.DataTextField = "Name"; ddlState.DataValueField = "Id"; ddlState.DataBind(); if (Info.Id &gt; 0) { //load info } } </code></pre> <p>As you can see I have 2 dropdown lists that I load <code>ddlContacts</code> and <code>ddlOrderbillto</code> and everything worked like it was supposed to. As soon as I added <code>ddlState</code> all the sudden I get the error I mentioned above. I've tried putting it inside an update panel and nothing. If I comment the <code>ddlState</code> datasource, databinding then it works but obviously I'm left with no states :(</p> <p>Help please? </p> <p>EDIT: I have 2 other dropdown lists "ddlCounties" and "ddlCity" which when page databinds they are blank, but upon changing "ddlState" they get populated through jquery. So from what I've read is that because they are not loaded originally then this could be the error?</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload