Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP Can Be Integrated With .NET
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00937994
Message ID:
00940900
Vues:
15
Not sure where to put this messag in this long thread, but if you just want to code in VFP and call it from ASP.NET, the solution is trivial:


Create a VFP class in a prg. Example:


page.prg:

DEFINE CLASS WebPage AS CUSTOM OLEPUBLIC
PROCEDURE Page
LPARAMETERS lcCommand
RETURN 'This is the command you entered: '+lcCommand
ENDDEFINE

Create a project page and then build a DLL (one of the last two options in the project builder screen).
Copy page.dll to c:\windows\system32 (or whatever your system folder is). In a DOS window type

c:
cd \windows\system32
regsvr32 page.dll



Create an ASPX page. Example:

page.aspx:

<%@ Page Language="vb" aspcompat=true%>
<%
Dim oPage As Object = Server.CreateObject("Page.WebPage")
Response.Write(oPage.Page("Hello World"))
%>


The key item here is "aspcompat=true". That allows you to instantiate non .NET objects from .NET.


Jonathan D. Melvin
JonM@vi-i.com
Dr. Jonathan D. Melvin
Vision Implementers, Inc.
www.vi-i.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform