How can modify this code below to pass multiple parameters
Code:
$("td", row).eq(0).find("a").attr("href", "Uncoated_Wire.aspx?Id=" + $(this).find("CustomerID").text());
Code:
<div>
<asp:GridView ID="gvCustomers" runat="server" AutoGenerateColumns="false" Style="display: none">
<Columns>
<asp:HyperLinkField DataTextField="CustomerID" HeaderText="CustomerID" />
<asp:BoundField DataField="ContactName" HeaderText="ContactName" />
<asp:BoundField DataField="City" HeaderText="City" />
<asp:BoundField DataField="Country" HeaderText="Country" />
</Columns>
</asp:GridView>
<br />
<asp:Button Text="Send" runat="server" ID="THistory" />
</div>
<div>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
$("#THistory").click(function (event) {
event.preventDefault();
$("#pdfFormInsideL1").hide();
document.getElementById('<%=gvCustomers.ClientID%>').style.display = 'block';
$("#gvCustomers").show();
$("#gvCustomers").attr("visibility", "visible");
$.ajax({
type: "POST",
url: "Default.aspx/GetCustomers",
data: '{}',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: OnSuccess,
failure: function (response) {
alert(response.d);
},
error: function (response) {
alert(response.responseText);
}
});
});
function OnSuccess(response) {
var xmlDoc = $.parseXML(response.d);
var xml = $(xmlDoc);
var customers = xml.find("Table");
var row = $("[id*=gvCustomers] tr:last-child").clone(true);
$("[id*=gvCustomers] tr").not($("[id*=gvCustomers] tr:first-child")).remove();
$.each(customers, function () {
var customer = $(this);
$("td", row).eq(0).find("a").text($(this).find("CustomerID").text());
$("td", row).eq(0).find("a").attr("href", "Uncoated_Wire.aspx?Id=" + $(this).find("CustomerID").text());
$("td", row).eq(1).html($(this).find("ContactName").text());
$("td", row).eq(2).html($(this).find("City").text());
$("td", row).eq(3).html($(this).find("Country").text());
$("[id*=gvCustomers]").append(row);
row = $("[id*=gvCustomers] tr:last-child").clone(true);
});
}
});
</script>
</div>