Button, changing CommandName and CommandArgs on the client side
<p>Is there a way to change the values for these two attributes on the client side and have it reflected on the server side after the postback. I tried it but it does not seem to work. I wanted to have one button on the page that I would delegate submits too, and assign these two arguments on the client side. Seems like not possible. Any idea?</p>

<p>Assuming there is a button named "cmd" in the form</p>

<pre><code> &lt;script type="text/javascript" language="javascript"&gt;
        $(document).ready(function () {
            $("#&lt;%=cmd.ClientID %&gt;").click(function () {
                $(this).attr("CommandName", "do").attr("CommandArgument", "arg2");
            });

        });

    &lt;/script&gt;
</code></pre>

<p>If one checks the value after postback they are still the same as they were before postback.</p>
