Skip to content

Instantly share code, notes, and snippets.

@martin0258
Created September 19, 2012 11:45
Show Gist options
  • Save martin0258/3749234 to your computer and use it in GitHub Desktop.
Save martin0258/3749234 to your computer and use it in GitHub Desktop.
Get the datakey value of the selected row in GridView
protected void GridView1_SelectedIndexChanged(object sender, EventArgs e)
{
Console.WriteLine(((GridView)sender).SelectedValue.ToString());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment