当前位置: 首页 > 图文教程 > 网络编程 > ASP.NET > 两个窗体之间传值

ASP.NET
Web服务器控件:LinkButton控件
Web服务器控件:ListBox控件
Web服务器控件:ListItem控件
Web服务器控件:Literal控件
Web服务器控件:Panel控件
Web服务器控件:PlaceHolder控件
Web服务器控件:RadioButton控件
Web服务器控件:RadioButtonList控件
Web服务器控件:BulletedList控件
Web服务器控件:Style控件
Web服务器控件:Table控件
Web服务器控件:TableCell控件
Web服务器控件:TableRow控件
Web服务器控件:TextBox控件
Web服务器控件:XML控件
Validation服务器控件:CompareValidator控件
Validation服务器控件:CustomValidator控件
Validation服务器控件:RangeValidator控件
Validation服务器控件:RegularExpressionValidator控件
Validation服务器控件:RequiredFieldValidator控件

ASP.NET 中的 两个窗体之间传值


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 133 ::
收藏到网摘: n/a


Form1中放一个Label1,一个Button1,Form1为主窗口,当点击Button1时,执行:
Form2 f2 = new Form2();
f2.ShowDialog(this);
Form2中放一个TextBox1,一个Button1,当点击Button1时执行:
Form1 f1 = (Form1)this.Owner;
f1.Label1.Text = this.TextBox1.Text;注意:Form1中的label1要设为public