doPostBack client-side function

Discussion in 'ASP .Net' started by Johno, Jul 18, 2003.

  1. Johno

    Johno Guest

    Whenever you drop a linkbutton on an ASP.NET web form,
    the following script gets emitted:

    function __doPostBack(eventTarget, eventArgument) {
    var theform = document.Form1;
    theform.__EVENTTARGET.value = eventTarget;
    theform.__EVENTARGUMENT.value =

    However, when I check the call to __doPostBack() executed
    when the linkbutton is checked, only the eventTarget
    argument is specified, even though the linkbutton has
    it's CommandArgument property set.

    What's the purpose of the .__EVENTARGUMENT field in
    relation to server-side postback controls?


    Johno, Jul 18, 2003
    1. Advertisements

  2. Johno

    Marina Guest

    __doPostBack is the generic generated function to cause postbacks.
    Perhaps other controls that use it do have a reason to use the
    __eventargument field.
    Marina, Jul 18, 2003
    1. Advertisements

  3. Johno

    Teemu Keiski Guest

    For example controls that implement IPostBackEventHandler interface can send
    arguments for postback processing. Some action might vary based on which
    argument has been sent for the particular control. For example
    implementation of Next/Prev buttons in a custom control.

    Teemu Keiski
    MCP, Designer/Developer
    Mansoft tietotekniikka Oy

    AspInsiders Member,
    ASP.NET Forums Moderator,
    AspAlliance Columnist,
    Teemu Keiski, Jul 18, 2003
  4. Johno

    Johno Guest

    Thanks for the response guys

    Johno, Jul 21, 2003
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.