Milestones Professional ASP Example #1

This example uses Active Server Pages (ASP) to:
1     Open a Milestones Professional chart from a web server.
2 Generate a bitmap image with a random number.
3 Display the bitmap in the user's browser.
Note: this is a very simple example. You might have a form which prompts the user to select a schedule to display.  We'll have some more advanced examples soon.  Check back to this page.  Meanwhile, click here to visit our main programmer's page and check out our examples for Excel, Access and Microsoft Project.

About using Milestones with ASP Scripts on your WebServer

Run one of our examples on our server

ASP CODE   (Milestones interface calls shown in Blue)

<% Response.Expires = 0 Response.Buffer = TRUE %>



<title>Output Via ASP/IIS/JPEG Example</title> 



<p>Output Via ASP/IIS/JPEG Example</p> <hr>

<% If Len(Request.Form("FormAction")) = 0 Then

' Create the Milestones object using a file on the web server


'Activate Milestones


'Refresh Milestones


'Generate a random # and build a file name for the image


ImageName = "filtout"+CStr(Rnd)+".jpg" 

FullPathImageName = "c:\webfolder\webname\tempimage\"+ImageName 

WWWPathImageName = ""+ImageName

'Generate Bitmap

oMiles.SaveBitmap (FullPathImageName) 

oMiles.Close "NoSave"

'Show the Bitmap in the user's browser

Response.Write "<p><img src="""+WWWPathImageName+"""></p>"

End If %>


</body> </html>


Click here to visit our main programmer's page.