doPostBack client-side function

Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default doPostBack client-side function

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

    TIA

    John
    Johno Guest

  2. Similar Questions and Discussions

    1. Passing multiple arguments to the client-side JavaScript function in AJAX
      I am a beginner with AJAX, and have managed to learn how to use it when passing single parameters, but I want to return more than one value to the...
    2. flashcom: client side cant access server side
      hi all, i hav install the flash com on the PC. It work well, on the server PC, i can access and log in to the 'chat room'.. however, if im...
    3. Controls with a client side onLoad function or seting a cursor server side
      Is there any way to create a web control that calls a client side onLoad function? Its diffucilt since you are not able to access the form or...
    4. Client side and server side scripting problem
      Hiya I have a problem with using some client side and server side scripting together in an ASP. I'm using VBScript. What I'm trying to achieve...
    5. button evet ---- server side - client side ???
      I want to use button. My question is that How can use server side and client site event at the same time. That is: I want to use button : when...
  3. #2

    Default 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@hotmail.com> wrote in message
    news:001f01c34d47$6ab94790$a401280a@phx.gbl...
    > 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 =
    > 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 .__EVENTARGUMENT field in
    > relation to server-side postback controls?
    >
    > TIA
    >
    > John

    Marina Guest

  4. #3

    Default Re: doPostBack client-side function

    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
    [url]http://www.mansoft.fi[/url]

    AspInsiders Member, [url]www.aspinsiders.com[/url]
    ASP.NET Forums Moderator, [url]www.asp.net[/url]
    AspAlliance Columnist, [url]www.aspalliance.com[/url]


    "Johno" <ltj__bukem@hotmail.com> wrote in message
    news:001f01c34d47$6ab94790$a401280a@phx.gbl...
    > 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 =
    > 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 .__EVENTARGUMENT field in
    > relation to server-side postback controls?
    >
    > TIA
    >
    > John

    Teemu Keiski Guest

  5. #4

    Default Re: doPostBack client-side function

    Thanks for the response guys

    John
    Johno Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139