Find the Row index when you click a button in a gridview by using the following in the button click method in code behind
GridViewRow row = ((LinkButton)sender).Parent.Parent as GridViewRow;
Response.Write(row.RowIndex);
Other way to use it is to have a command Name(for ex:View) and a Command Argument for the button and then using the GridView_RowCommand(object sender, GridViewCommandEventArgs e) _
There you can use some thing like
if (e.CommandName.ToString().Equals("View"))
{
int currentRowIndex = Int32.Parse(e.CommandArgument.ToString());
}
Monday, May 24, 2010
Thursday, May 20, 2010
VS 2005 takes too much time to load
VS 2005 takes too much time to load when you open it or trying to open a project.
Go to Tools -- > Import and Export Settings
and select Reset Settings.
That should do it.
You can do it as often as you want
Go to Tools -- > Import and Export Settings
and select Reset Settings.
That should do it.
You can do it as often as you want
Subscribe to:
Posts (Atom)