Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Calling a function within behind-code (c#)
Message
 
To
26/02/2003 15:29:40
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00758128
Message ID:
00758556
Views:
13
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.com
www.prenia.com
Weblog: blogs.prenia.com/cathi
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform