重载ShowDialogpublic System.Windows.Forms.DialogResult ShowDialog(System.Windows.Forms.Form owner, out object objOut) { System.Windows.Forms.DialogResult result; if (owner==null) { result = base.ShowDialog(); } else { result = base.ShowDialog(owner); } objOut = 你的DataTable this.Dispose(true); return result; }
it could be realized by using "Session",but the question lies on "by what" get return;using "javascript" or "overload the dialog",i don't know!pls expers share your points!
如下:
主窗口:Form1;
public static DataTable dt;
弹出窗口:
private void button1_Click(object sender, System.EventArgs e)
{
Form1.m = "llll";
}
{
System.Windows.Forms.DialogResult result;
if (owner==null)
{
result = base.ShowDialog();
}
else
{
result = base.ShowDialog(owner);
}
objOut = 你的DataTable
this.Dispose(true);
return result;
}