我想显示标签(使隐藏的可见)并在单击时更改按钮的文本,并且能够再次单击该按钮以显示其原始文本并隐藏标签。`
public partial class TestClick : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
btnShowButtonText.Text = "Button";
lblShowText.Visible = false;
}
}
protected void btnShowButtonText_Click(object sender, EventArgs e)
{
if (!Session.IsNewSession)
{
btnShowButtonText.Text = "Hide gift voucher details";
lblShowText.Visible = true;
}
}