I want to pass multiple values but this example up passes only one parameter
i am using this example How to bind and pass query string in HyperLink in GridView in ASP.Net
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="StudentSearch2000.aspx.vb" Inherits="UNIFORMWEB2023.StudentSearch2000" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<script src="../Scripts/jquery-1.8.3.min.js"></script>
<script src="ASPSnippets_Pager.min.js"></script>
<script type="text/javascript">
$(function () {
GetCustomers(1);
});
$("[id*=txtSearch]").live("keyup", function () {
GetCustomers(parseInt(1));
});
$(".Pager .page").live("click", function () {
GetCustomers(parseInt($(this).attr('page')));
});
function SearchTerm() {
return jQuery.trim($("[id*=txtSearch]").val());
};
function GetCustomers(pageIndex) {
$.ajax({
type: "POST",
url: "StudentSearch2000.aspx/GetCustomers",
data: '{searchTerm: "' + SearchTerm() + '", pageIndex: ' + pageIndex + '}',
contentType: "application/json; charset=utf-8",
dataType: "json",
success: OnSuccess,
failure: function (response) {
alert(response.d);
},
error: function (response) {
alert(response.d);
}
});
}
var row;
function OnSuccess(response) {
var xmlDoc = $.parseXML(response.d);
var xml = $(xmlDoc);
var customers = xml.find("Customers");
if (row == null) {
row = $("[id*=StudentGrid] tr:last-child").clone(true);
}
$("[id*=StudentGrid] tr").not($("[id*=StudentGrid] tr:first-child")).remove();
if (customers.length > 0) {
$.each(customers, function () {
var customer = $(this);
$("td", row).eq(0).html($(this).find("ADMNO").text());
$("td", row).eq(1).html($(this).find("Name").text());
$("td", row).eq(2).html($(this).find("Class").text());
$("td", row).eq(3).html($(this).find("Stream").text());
$("td", row).eq(4).html($(this).find("STDTYPE").text());
$("td", row).eq(5).html($(this).find("House").text());
$("td", row).eq(6).html($(this).find("SEX").text());
$("[id*=StudentGrid]").append(row);
row = $("[id*=StudentGrid] tr:last-child").clone(true);
});
var pager = xml.find("Pager");
$(".Pager").ASPSnippets_Pager({
ActiveCssClass: "current",
PagerCssClass: "pager",
PageIndex: parseInt(pager.find("PageIndex").text()),
PageSize: parseInt(pager.find("PageSize").text()),
RecordCount: parseInt(pager.find("RecordCount").text())
});
$(".Name").each(function () {
var searchPattern = new RegExp('(' + SearchTerm() + ')', 'ig');
$(this).html($(this).text().replace(searchPattern, "<span class = 'highlight'>" + SearchTerm() + "</span>"));
});
} else {
var empty_row = row.clone(true);
$("td:first-child", empty_row).attr("colspan", $("td", row).length);
$("td:first-child", empty_row).attr("align", "center");
$("td:first-child", empty_row).html("No records found for the search criteria.");
$("td", empty_row).not($("td:first-child", empty_row)).remove();
$("[id*=StudentGrid]").append(empty_row);
}
};
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<table cellpadding="2" class="newStyle1">
<tr>
<td>Student Search</td>
<td class="auto-style1">
<asp:TextBox ID="txtSearch" runat="server" style="margin-left: 0px"></asp:TextBox>
</td>
</tr>
<tr>
<td colspan="2">
<asp:GridView ID="StudentGrid" runat="server" AutoGenerateColumns="False">
<Columns>
<asp:BoundField DataField="admno" HeaderText="admno" />
<asp:BoundField DataField="Name" HeaderText="Student Names" />
<asp:BoundField DataField="Class" HeaderText="Class" />
<asp:BoundField DataField="stream" HeaderText="Stream" />
<asp:BoundField DataField="stdtype" HeaderText="STDTYPE" />
<asp:BoundField DataField="House" HeaderText="Colour" />
<asp:BoundField DataField="Sex" HeaderText="Sex" />
<asp:TemplateField>
<ItemTemplate>
<asp:HyperLink runat="server" NavigateUrl='<%#String.Format("~/Forms/Client.aspx?admno={0}&Name={1}&Class={2}",
HttpUtility.UrlEncode(Eval("ADMNO").ToString()), HttpUtility.UrlEncode(Eval("Name").ToString()), HttpUtility.UrlEncode(Eval("Class").ToString())) %>'
Text="View Details" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>
</td>
</tr>
<tr>
<td> </td>
<td class="auto-style1"> </td>
</tr>
</table>
</div>
</form>
</body>
</html>
when i pass data using this
<asp:TemplateField>
<ItemTemplate>
<asp:HyperLink runat="server" NavigateUrl='<%#String.Format("~/Forms/Client.aspx?admno={0}&Name={1}&Class={2}",
HttpUtility.UrlEncode(Eval("ADMNO").ToString()), HttpUtility.UrlEncode(Eval("Name").ToString()), HttpUtility.UrlEncode(Eval("Class").ToString())) %>'
Text="View Details" />
</ItemTemplate>
</asp:TemplateField>
admno | Student Names | Class | Stream | STDTYPE | Colour | Sex | |
22-00003 |
AHAMAGARA EMMANUEL MARY |
P1 |
D |
Old |
Green |
FEMALE |
View Details |
22-00004 |
AKANDINDA FRANKLIN |
P1 |
E |
Old |
Red |
MALE |
View Details |
22-00005 |
AKORAGYE TINKIE |
P1 |
D |
Old |
Blue |
FEMALE |
View Details |
22-00006 |
ANZOA ABIGAIL SURUR |
P1 |
E |
Old |
Green |
FEMALE |
View Details |
22-00007 |
BAWOOZA JARIANAH MALAIKA |
P1 |
E |
Old |
Yellow |
FEMALE |
View Details |
here is the link but empty when i click on the hyperlink
http://localhost:2023/Forms/Client.aspx?admno=&Name=&Class=