use a session...
in the code where you launch the pop up from you'd have something like:
....
// store the datatable
Session["DataTable"] = sourceDt;
// write some script to launch the pop up
string szJavaScript = " <SCRIPT language=javascript>" +
System.Environment.NewLine +
" window.open('MYPOPUP.ASPX', '_blank',
'width=300,height=150,top=250,left=350,toolbar=no,scrollbars=no,status=no,re
sizable=no', 'true');" + System.Environment.NewLine +
" </SCRIPT>";
RegisterClientScriptBlock( "LaunchPopup", szJavaScript );
......
replace the 'MYPOPUP.ASPX' with your popup name.
then in the Page_Load of your pop up window you'd have something like
// get the datatable
object objDataTable = Session["DataTable"];
DataTable dt;
if ( objDataTable is DataTable )
{
dt = (DataTable) objDataTable;
// .....do your business with it here....
}
be careful of word wrapping in this document, if you're using VB and need it
in that, lemme know and I'll do that for you.
hope that helps.
Dan.
Hello,
which is the best way to transfer my DataTable to a PopUp Window?
Using Context would be great but I it seems not to work.
Which is the best solution?
Thanks in advance,
Andreas