-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: loverboy43dk
Message 1 in Discussion
below is my code.i am generating my file in server then download it clientside.but it
is taking lots of server resources.so i want to generate file at cleient side
directly.is there any way to do that.
string strfileName = "PerformanceGoal.rtf";
FileStream MyStream = new FileStream("c:/TEMP/" + strfileName, FileMode.Create);
System.IO.StreamWriter MyWriter =new System.IO.StreamWriter(MyStream);
MyWriter.Write(ExportToRTF.PerfBuildReport("Performance Plan", "",dst,strFirstName+"
"+strLastName,"Date :
"+DateTime.Now.Date.ToString(Utilities.constDispDateFormat),"Grade : " + strGrade));/*
here i am generating file in RTF-Spec-1.2
MyWriter.Close();
MyStream.Close();
ProcessStartInfo StartInfo =new ProcessStartInfo();
StartInfo.FileName = "wordpad.exe";
StartInfo.Arguments = strfileName;
StartInfo.WindowStyle = ProcessWindowStyle.Maximized;
StartInfo.UseShellExecute = true;
System.Diagnostics.Process.Start(StartInfo);
Response.Clear();
Response.ContentType="application/octet-stream";
Response.AddHeader("Content-Disposition","attachment; filename=" + strfileName );
Response.Flush();
Response.WriteFile("c:\\TEMP\\"+strfileName);
Response.End();
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you received
this message by mistake, please click the "Remove" link below. On the pre-addressed
e-mail message that opens, simply click "Send". Your e-mail address will be deleted
from this group's mailing list.
mailto:[EMAIL PROTECTED]