Edd
Posts: 547
|
| Posted: 01/27/2008, 4:59 PM |
|
Dean,
This is my way of doing this:
1. Create a separate class as stated in the example and put it where you have the classes.asp area.
2. Open the page you wish to this to be added and open the code to the page (not the events part but the generated gode area) and at the top slip in your additional class without affecting the rest of the page, e.g.
<%
'Include Common Files @1-AED2A97A
%>
<!-- #INCLUDE FILE="Common.asp"-->
<!-- #INCLUDE FILE="Cache.asp" -->
<!-- #INCLUDE FILE="Template.asp" -->
<!-- #INCLUDE FILE="Sorter.asp" -->
<!-- #INCLUDE FILE="Navigator.asp" -->
<%
'End Include Common Files
%>
<!--#include file="cAspImage.asp"-->
<%
'Initialize Page @1-ABBE20FE
' Variables
..........etc
3. In the AftterFileUpload event
Dim oAspImg
Dim FileNamePath
if DataSourceName.FileControlName.IsUploaded Then
Set oAspImg = New cAspImage
FileNamePath = DataSourceName.FileControlName.FileFolder & DataSourceName.FileControlName.value
With oAspImg
.ReadImage(FileNamePath)
Response.Write "ImageSize: " & .ImageSize & "<BR />"
Response.Write "Date Created: " & .DateCreated & "<BR />"
Response.Write "Date Last Modified: " & .DateLastModified & "<BR />"
Response.Write "ColorDepth: " & .ColorDepth & "<BR />"
Response.Write "Width: " & .Width & "<BR />"
Response.Write "Height: " & .Height & "<BR />"
Response.Write "ImageType: " & .ImageType & "<BR />"
Response.Write "Error Message: " & .ErrorMessage & "<BR />"
End With
Set oAspImg = Nothing
End If
This should give you a reasonable start on this.
Cheers - Edd
_________________
Accepting and instigating change are life's challenges.
http://www.syntech.com.au |