protected void CheckBox1_CheckedChanged(object sender, EventArgs e)
{
string id;
id = Request.QueryString["tt"].ToString().Trim();
this.lable5.Text = Session["mselect" + id];
this.CheckBox1.InputAttributes.Add("onclick", "parent.left.document.getElementById(Answer1).value='A';");
}
{
string id;
id = Request.QueryString["tt"].ToString().Trim();
this.lable5.Text = Session["mselect" + id];
this.CheckBox1.InputAttributes.Add("onclick", "parent.left.document.getElementById(Answer1).value='A';");
}
form2中先写好一个访问器:
string txt;
public string Txt
{
set{ txt=value;}
}
在form1中的Button_click事件中写
form2 frm2=new form2();
frm2.Txt="xxx";(其中"xxx"表示你要赋的值,如果是别的格式的把上面的string改成相应的格式就好了)
frm2.show();在form2_Load 事件中写:
label1.text=txt;
这句有问题