The thing is had a button that would do that but i decided it to use an hyperlink, int the code you will see that the button i was using was redirecting me to the team page, in wich the id would give the information that would fill the other fields. Basically i am in the player page and i wantoi it to redirect to the the players team page by the id.
protected void Button4_Click(object sender, EventArgs e)
{
int playerId = Convert.ToInt32(Request.QueryString["Id"]);
DBLPlayers players = new DBLPlayers();
Player player = players.SelectById(playerId);
Response.Redirect("DetalhesClube.aspx?Id=" + player.Team.ID.ToString());
}
protected void CheckBoxList1_SelectedIndexChanged(object sender, EventArgs e)
{
}
}
How can i use the hyperlink to do this?
Is just a matter of UI visualization? Use a
LinkButtoninstead… the code behind will remain the same.Do you prefer to have a direct HTML link to the new page? For each player load also the related team’s Id in you aspx page and use it to compose the
<a>hiperlink.If you post the aspx code we could be more precise.