I have a button in the emptydatatemplate field if there are no rows generated. This button basically got to another page when you click it. Problem is the click even is not being hit while in this. I also have this exact same button in the header when there is data in the gridview. I also renamed it and renamed the click event but still the same problem.
<EmptyDataTemplate>
<asp:Button ID="CreatePlayerButton" runat="server" OnClick="CreatePlayerButton_Click"
Text="Create Player" ToolTip="Create A Player" /> There are currently no players on this team.
</EmptyDataTemplate>
protected void CreatePlayerButton_Click(object sender, EventArgs e)
{
MembershipUser mu = Membership.GetUser();
Roles.RemoveUserFromRole(mu.UserName.ToString(), "tempplayers");
Roles.AddUserToRole(mu.UserName.ToString(),"tempplayers");
Server.Transfer("~/Members/Players/EditBio.aspx?TeamID=" + TeamsDropDownList.SelectedValue.ToString());
}
That is not being hit above with a breakpoint, but it hits when it is in the header of the gridview. Any ideas please.
Michael S. Flynn