If you want to subscribe to a click event I would rather use the ASP LinkButton control than a regular hyperlink. Example:
protected void Page_Load(object sender, EventArgs e)
{
LinkButton linkButton = new LinkButton();
linkButton.Text = "LinkButton";
linkButton.Click += new EventHandler(linkButton_Click);
PlaceHolder1.Controls.Add(linkButton);
}
void linkButton_Click(object sender, EventArgs e)
{
LinkButton linkButton = sender as LinkButton;
if (linkButton.Text == "LinkButton")
{
Response.Redirect("WebForm2.aspx");
}
}