I have asp button:
<asp:button ID="btn1" runat="server" CommandArgument="" CssClass="btn1" OnClick="button_click"></asp:button>
and script:
$("a").click(function () {
var val = $(this).attr('id').toString();
$('.btn1').attr('CommandArgument',val);
alert($('.btn1').attr('CommandArgument').toString());
$('.btn1').click();
});
after click it alerts me command argument. But on next step - when i trigger btn1 click with jquery it goes to codebehind and command argument is empty. Can i pass somehow command argument with jquery?
I've tried to save value to global variables but after postback they're all empty. And i don't want to use cookies or viewstate for that.
Thanks!