doPostBack client-side function

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Johno

    #1

    doPostBack client-side function

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

    function __doPostBack(ev entTarget, eventArgument) {
    var theform = document.Form1;
    theform.__EVENT TARGET.value = eventTarget;
    theform.__EVENT ARGUMENT.value =
    eventArgument;
    theform.submit( );
    }

    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 .__EVENTARGUMEN T field in
    relation to server-side postback controls?

    TIA

    John
  • Marina

    #2
    Re: doPostBack client-side function

    __doPostBack is the generic asp.net generated function to cause postbacks.
    Perhaps other controls that use it do have a reason to use the
    __eventargument field.

    "Johno" <ltj__bukem@hot mail.com> wrote in message
    news:001f01c34d 47$6ab94790$a40 1280a@phx.gbl.. .[color=blue]
    > Whenever you drop a linkbutton on an ASP.NET web form,
    > the following script gets emitted:
    >
    > function __doPostBack(ev entTarget, eventArgument) {
    > var theform = document.Form1;
    > theform.__EVENT TARGET.value = eventTarget;
    > theform.__EVENT ARGUMENT.value =
    > eventArgument;
    > theform.submit( );
    > }
    >
    > 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 .__EVENTARGUMEN T field in
    > relation to server-side postback controls?
    >
    > TIA
    >
    > John[/color]


    Comment

    • Teemu Keiski

      #3
      Re: doPostBack client-side function

      For example controls that implement IPostBackEventH andler 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, www.aspinsiders.com
      ASP.NET Forums Moderator, www.asp.net
      AspAlliance Columnist, www.aspalliance.com


      "Johno" <ltj__bukem@hot mail.com> wrote in message
      news:001f01c34d 47$6ab94790$a40 1280a@phx.gbl.. .[color=blue]
      > Whenever you drop a linkbutton on an ASP.NET web form,
      > the following script gets emitted:
      >
      > function __doPostBack(ev entTarget, eventArgument) {
      > var theform = document.Form1;
      > theform.__EVENT TARGET.value = eventTarget;
      > theform.__EVENT ARGUMENT.value =
      > eventArgument;
      > theform.submit( );
      > }
      >
      > 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 .__EVENTARGUMEN T field in
      > relation to server-side postback controls?
      >
      > TIA
      >
      > John[/color]


      Comment

      • Johno

        #4
        Re: doPostBack client-side function

        Thanks for the response guys

        John

        Comment

        Working...