Using the code below will not add the query string 'section' to the link. The url adds just fine but what am i doing wrong with the query string?
@Html.Hidden("Url", Request.RawUrl)
@Html.Hidden("Query", sectionGroup.Term)
<a href="#" id="ajaxLink">@sectionGroup.Term</a>
<script>
$("#ajaxLink").click(function () {
$.ajax({
type: "POST",
url: $("#Url").val(),
data: { section : $("#Query").val() }
}).done(function() {
});
});
</script>
url: $("#Url").val() + "?section=value",