Ammer
Ammer

Reputation: 427

__EVENTARGUMENT is reposted upon next postback

I have some javascript that handles a postback from a listbox like this:

__doPostBack('<%= upCompanieslist.ClientID  %>', 'UpdateLV');

I also have an updatepanel with an AsyncPostBackTrigger tied to its itemcommand event.

    <Triggers>
        <asp:AsyncPostBackTrigger ControlID="lvCompanyList" EventName="ItemCommand" />
    </Triggers>

Once the __doPostBack is fired its set to "UpdateLV". The problem is that it remains "UpdateLV" when the next time the updatepanel is fired. Is there a way to clear the __EventArgument after a post back of any type?

Upvotes: 1

Views: 961

Answers (1)

IUnknown
IUnknown

Reputation: 22468

<script type="text/javascript">
    function pageLoad() {
        window.document.getElementById('__EVENTARGUMENT').value = '';
    }
</script>

Upvotes: 2

Related Questions