I've got a lot of demos of this at:
http://www.activevfp.com/avfpdemo2/default.aspxThe key is the TLBIMP.exe command included with the free .NET framework. I would go this route to begin with instead of VS.NET which just does the same thing under the covers. This is especially true if you want to do most of your dev in VFP. Here's the basics-
you simply run the included tlbimp
command on your Visual FoxPro mtdll like:
tlbimp avfpdemo2.dll /out:avfpdemo2_dotnetproxy.dll
Then call your Visual FoxPro mtdll from ASP.NET(.aspx), for example, with the following C# (entered using
NotePad or the Visual FoxPro editor):
<% @Page Language="C#" ASPCompat="true" %>
<% @Import Namespace="avfpdemo2_dotnetproxy" %>
<%
server x ; //server is the VFP class
x = new server() ;
try
{
Response.Write(x.demo()); //demo is the VFP method
}
catch(Exception ex)
{
Response.Write("Caught .NET exception, source: " + ex.Source + " message: " + ex.Message);
}
%>
>Hi,
>
>How do I create a referance to a VFP com object from an ASPX.
>
>I have a lot of legacy VFP com objects that I would like to use in ASPX.
>
>Regards,
>Neil