The only values which will be sent to the action are the inputs within the form you've submitted.
The
SearchId
input is in a different form, so it won't be submitted to the
SaveData
action.
You'll need to add a hidden input to your
SaveData
form, and use JavaScript to copy the value from the visible input when the form is submitted.
@using (Html.BeginForm("SaveData", "Access", FormMethod.Post, new { id = "saveForm" }))
{
@Html.AntiForgeryToken()
<input type="hidden" name="SearchId" id="SaveData_SearchId" />
...
<input type="submit" value="Save" class="btn btn-default" />
}
@section Scripts {
<script>
$("#saveForm").submit(function(){
$("#SaveData_SearchId").val($("#SearchId").val());
});
</script>
}