{asp:gridview allowpaging="True" allowsorting="True" autogeneratecolumns="False" datakeynames="CustomerID" datasourceid="SqlDataSource1" id="GridView1" runat="server">
{columns>
[asp:boundfield datafield="CustomerID" headertext="CustomerID" readonly="True" sortexpression="CustomerID">
[asp:boundfield datafield="CompanyName" headertext="CompanyName" sortexpression="CompanyName">
[asp:boundfield datafield="ContactName" headertext="ContactName" sortexpression="ContactName">
[asp:boundfield datafield="Address" headertext="Address" sortexpression="Address">
[asp:boundfield datafield="City" headertext="City" sortexpression="City">
[/asp:boundfield>
[/asp:boundfield}
C#
protected void Page_Load(object sender, EventArgs e)
{
string cid = Request.QueryString["CID"];
string cname = Request.QueryString["CName"];
Response.Write("CustomerID= " + cid + " : " + "CompanyName= " + cname);
}
{script type="text/javascript">
$(document).ready(function() {
$("tr").click(function(event) {
var row = jQuery(this)
var firstParam = row.children("td:eq(0)").text();
var secondParam = row.children("td:eq(1)").text();
var navUrl = "http://localhost:7250/GridViewRowJQuery/CustomerDetails.aspx?cid=" + firstParam + "&cname=" + secondParam;
top.location = navUrl;
});
});
{/script}
-
The following article discusses the WPF command binding feature with relation to Mouse clicks. One of WPF powerful features is the bindin...
-
SQL Server has never been short of ways to read from and write to files and it is always better to use the standard techniques provided b...
-
In this article we will look at the basics of Angular.Js. This is the first part of an article series. The main objective of this series i...