定义全局静态的字符串
public static string tagg;
protected void Button1_Click(object sender, EventArgs e)
{
if (tagg == "a")
{
Button1.Text = "'" + flag + "'";
tagg = "b";
}
else
{
Button1.Text = "qw";
}
}
protected void Button2_Click(object sender, EventArgs e)
{
flag = true;
tagg = "a";
Button2.Text = "aniueydianji";
}