Mike,
That's no problem, remember that this code exists in the code behind c#
file, where you construct the javascript string you'd like to run on the
next page refresh.
string szFilename = "xmlfile" + lngFileNumber.ToString() + ".xml";
// code to save the xml file here
// StreamWriter wrtr = File.CreateText (szfilename) etc etc...
// script string generation code
string szScript = "";
szScript += "<SCRIPT language=javascript>\r\n";
szScript += " window.open('" + szfilename + "', '_blank',
'width=700,height=450,top=100,left=100,toolbar=no,scrollbars=no,status=no,re
sizable=yes', 'true');\r\n";
szScript += "</SCRIPT>";
RegisterClientScriptBlock("SetupTable", szScript);
adjust the javascript parameters as you need to for the screen size etc...
Dan.
Dan,
Thanks for your help. Your javascript is almost the sort of thing I
want to do, but I need to open a file whose name will be dependent on a
variable i.e. in C# this would be "xmlfile" + lngFileNumber + ".xml".
How would I do this in javascript?
Cheers,
Mike