msgbartop
Gossimer’s Premier Web Hosting and Domain Registration Knowledgebase.
msgbarbottom

23 Aug 10 ASPUpload Component

ASPUpload is an Active Server component which enables an ASP application to accept, save and manipulate files uploaded with a browser. The files are uploaded via an HTML POST form with one or more <INPUT TYPE=FILE> tags. The <FORM> tag must contain the attribute ENCTYPE=”multipart/form-data”. All Gossimer Windows Hosting packages have support enabled for ASPUpload component. You can use the sample script provided below and tweak it a bit to suit your requirements.

 

Upload Script (Upload.asp)

<%
Set Upload = Server.CreateObject(“Persits.Upload”)
Count = Upload.Save(“C:WHBSitesyourdomainname.comdatafiles”)
Response.Write Count & ” file(s) uploaded to C:WHBSitesyourdomainname.comdatafiles”
%>

HTML form for uploading up to 3 files

<HTML>
<BODY BGCOLOR=”#FFFFFF”>
<FORM METHOD=”POST” ENCTYPE=”multipart/form-data” ACTION=_quot;Upload.asp_quot;_gt;
<INPUT TYPE=”FILE” NAME=”FILE1″ SIZE=”50″><BR>
<INPUT TYPE=”FILE” NAME=”FILE2″ SIZE=”50″><BR>
<INPUT TYPE=”FILE” NAME=”FILE3″ SIZE=”50″><BR>
<INPUT TYPE=”SUBMIT” VALUE=”Upload!”>
</FORM>
</BODY>
</HTML>

 

Tags: , , , , , , , , , , , , , , , , , , , , , ,

17 Aug 10 Active Server Component (ASPMail)

Every Gossimer Windows Web Hosting package comes with the ASPMail component, which allows you to send SMTP mail directly from a Web page.

You can easily customise our sample script and put it up on your website. You would, however, need to change the Email address in the field Mailer.FromAddress to any Email address on the Domain on which you are incorporating the script. For example, if your Domain Name is abc.com, then you need to define the Email address as user@abc.com. This Email address need not be existing on the Mail Server of abc.com, however, the domain name in the Mailer.FromAddress has to be yours. Thus, you may use an Email address like Do_Not_reply@abc.com as the Mailer.FromAddress.

The Email address in the Mailer.AddRecipient field needs to be changed to your Email address, where you wish to receive Emails submitted through the web page.

Sample Script

<%

Set Mailer = Server.CreateObject(“SMTPsvg.Mailer”)
Mailer.FromName = “Testing”
Mailer.FromAddress= “user@abc.com ”
Mailer.RemoteHost = “localhost”
Mailer.AddRecipient “Testing User”, “youremail”
Mailer.Subject = “Testing”
Mailer.BodyText = “Testing”
if Mailer.SendMail then
Response.Write “Mail sent…”
else
Response.Write “Mail send failure. Error was ” & Mailer.Response
end if %>

Tags: , , , , , , , , , , , , , , , ,

10 Aug 10 ASPSmartUpload Component

 

ASPSmartUpload is an Active Server component which enables an ASP application to accept, save and manipulate files uploaded through a browser. The files are uploaded via a HTML POST form with one or more <INPUT TYPE=FILE> tags. The <FORM> tag must contain the attribute ENCTYPE=”multipart/form-data”. All Gossimer Windows Hosting packages have support enabled for ASPSmartUpload component. You can use the sample script provided below and tweak it a bit to suit your requirements.

 

Upload Script (Upload.asp)

<%
// Variables

Dim mySmartUpload
Dim intCount

// Object creation

Set mySmartUpload = Server.CreateObject(“aspSmartUpload.SmartUpload”)

// Upload

mySmartUpload.Upload

// Save the files in a folder on the web server

intCount = mySmartUpload.Save(“C:WHBSitesyourdomainname.comdatafiles”)

// Display the number of files uploaded

Response.Write(intCount & ” file(s) uploaded to C:WHBSitesyourdomainname.comdatafiles”)
%>

HTML form for uploading up to 3 files

<HTML>
<BODY BGCOLOR=”#FFFFFF”>
<FORM METHOD=”POST” ENCTYPE=”multipart/form-data” ACTION=_quot;Upload.asp_quot;_gt;
<INPUT TYPE=”FILE” NAME=”FILE1″ SIZE=”50″><BR>
<INPUT TYPE=”FILE” NAME=”FILE2″ SIZE=”50″><BR>
<INPUT TYPE=”FILE” NAME=”FILE3″ SIZE=”50″><BR>
<INPUT TYPE=”SUBMIT” VALUE=”Upload!”>
</FORM>
</BODY>
</HTML>

 

Tags: , , , , , , , , , , , , , , , , , , , , , , ,