Home--> Articles -->Site Tools

Write an ASP component in Visual Basic

Post By 846022417 on 2008-9-26 15:13:20  [Reads:78]


Write an ASP component in Visual Basic

It is sometimes necessary to write its own components in order to add some functions has your site. It is why we will land today the creation of a component in Visual Basic.

The example that we have chosen is a component to send a promenade since one page asp.

In the zip to download you will find 1 - The Visual Basic project composed of the following files: HostMail.vbp frmHostMail.frm Connexion.cls

2 - the DLL compiled: Hostmail.dll

3 - a model of page asp permitting sends it: mail.asp

Installation of the Visual Basic project

It is all simple, it is sufficient to expand the zip in any file. Click then on HostMail.vbp and the project opens up.

Compile the DLL and it will be recorded automatically on your machine.

Side ASP pages

It does without commentary

<% Dim Dim objMail resulted result = False Set objMail = Server.CreateObject ("HostMail.Connexion")
objMail.Auteur = "webmaster@host-web.com"
objMail.Destinataire = "jean@asp-fr.net"
objMail.AuteurNom = "Roland Spilthooren" objMail.DestinataireNom = "Jean Lancon"
objMail.Sujet = "topic of the objMail.Corps promenade" = "It is for an objMail.Serveur test" = "smtp.host-web.com" resulted = objMail.Envoye Yew resulted Then% > < H2>Merci! your promenade has is sent.< / H2 > <% else% > < H3>The promenade has not been sent. Verify your parameters.< / H3 > <% end yew% >

Attention: This component (writes by Spilthooren Roland) is an example and is not destined has a commercial use. it has not been tested in intensive use and don't manage the mistakes for example indeed.

Sponsor Sites

Free Articles


Categories