I learned how to do it. You set the commandName property for what you want to call inside the properties.
Then, if you double-click the button after it is created in design mode, it should output the function to the code page by page. You can then access the line by doing the following.
protected void gvUsers_RowCommand ( , GridViewCommandEventArgs e)
{
int rowNum = int.Parse(e.CommandArgument.ToString());
}
.