ASP.NET with C# and SQL SERVER , some vb.net . asp.net examples, asp.net codes, asp.net programs, c# code, sql server queries, important codes.
Tuesday, 16 October 2012
Datakey on RowDataBount in Asp.Net C#
datakey at row data bound
---------------------------------------------------------------------------------------
protected void GridView2_RowDataBound(Object sender, GridViewRowEventArgs e)
{
string local_idcode="";
string local_year="";
if (e.Row.RowType == DataControlRowType.DataRow)
{
local_idcode = Convert.ToString(GridView2.DataKeys[e.Row.RowIndex].Values[1].ToString());
local_year = Convert.ToString(GridView2.DataKeys[e.Row.RowIndex].Values[2].ToString());
}
---------------------------------------------------------------------------------------
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment