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

ASP.NET
HTML服务器控件介绍:HtmlInputFile控件
HTML服务器控件介绍:HtmlInputHidden控件
HTML服务器控件介绍:HtmlInputImage控件
HTML服务器控件介绍:HtmlInputRadioButton控件
HTML服务器控件介绍:HtmlInputText控件
HTML服务器控件介绍:HtmlSelect控件
HTML服务器控件介绍:HtmlTable控件
HTML服务器控件介绍:HtmlTableCell控件
HTML服务器控件介绍:HtmlTableRow控件
HTML服务器控件介绍:HtmlTextArea控件
Web服务器控件:AdRotator控件
Web服务器控件:Button控件
Web服务器控件:Calendar控件
Web服务器控件:CheckBox控件
Web服务器控件:CheckBoxList控件
Web服务器控件:DropDownList控件
Web服务器控件:HyperLink控件
Web服务器控件:Image控件
Web服务器控件:ImageButton控件
Web服务器控件:Label控件

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


出处:互联网   整理: 软晨网(RuanChen.com)   发布: 2009-11-03   浏览: 132 ::
收藏到网摘: 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