<form method="post" action="/Lot/LotList?auctionEventId=@auctionEventId" id="filterForm">
<input type="hidden" id="showAll" name="showAll" value=""/>
<input type="button" onclick="submitForm()" value="Show all" />
function submitForm(){
$('#showAll').val('true');
$('#filterForm').submit();
}
_______________________________________________________________________________________________________________________________________________________________________________________________________________
--:)My code
<input type="submit" id="btnGenerate" value="Generate" class="btn btn-default" onclick="generate_alone()" style="text-align:center;width:100px;" />
<input type="submit" id="btnGenerateDownload" value="Generate & Download" class="btn btn-default" onclick="generate_n_download()" style="text-align:center;width:160px;" />
<input type="hidden" name="Generate" id="Generate" value="" />
<input type="hidden" name="Download" id="Download" value="" />
<script type="text/javascript">
function generate_n_download() {
$('#Generate').val('false');
//alert($('#Generate').val());
$('#Download').val('true');
$('#frmAttendanceGeneration').submit();
}
function generate_alone() {
$('#Generate').val('true');
$('#Download').val('false');
$('#frmAttendanceGeneration').submit();
}
</script>