Hi Sergio,
You can create javascript code in your code behind to run when the page is rendered. Look at message #
710745 for an explanation on how to do this.
>Hello Jayesh,
>
>This is my first asp.net page.
>
>I have a simple asp.net page with two controls (text and button WebForm control).
>Once I enter a Insurance policy number and then I click on the button I call a COM server(exe) written in VFP.
>The code run ok and display a PDF file (foxpro report converted to pdf).
>
>If the PDF is not created then I wanted to display a messagebox notifying that the PDF does not exist.( look at the if else statement below).
>
>***************************************************************************
>Here is the behind-code of my asp.net page:
>
>ASPBalanceDuePDFPRINT oVFP = new ASPBalanceDuePDFPRINT();
>oVFP.OPenTablesToPrint(this.txtPolicy.Text);
>oVFP.PrintReports();
>oVFP.ReleaseMyObject();
>oVFP.Destroy();
>if (System.IO.File.Exists(@"C:\Inetpub\wwwroot\TecoAsp\BalanceDue_591-156- 260.PDF"))
>{
> Response.Redirect("
http://216.242.16.168/TecoAsp/BalanceDue_591-156- 260.PDF");
>}
>else
>{
>here I want to display a message box. I was thinking to put a javascript function in my HTML code and then call it from here.
>
>****************************************************************************
>
>Thanks,
>Sergio
>
>
>**************************************************************************
-----------------------------------------
Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.comwww.prenia.comWeblog: blogs.prenia.com/cathi