2011-02-17 63 views

回答

1

這裏是適用的代碼:

protected void Link_Click(object sender, EventArgs e) 
{ 
    LinkButton link = sender as LinkButton; 
    if(link.Text == "enabled") 
    { 
     link.Text = "disabled"; 
     panel1.Visible = false; 
    } 
    else 
    { 
     link.Text = "enabled"; 
     panel1.Visible = true; 
    } 
}