Converting VB code to ASP code 
Author Message
 Converting VB code to ASP code

I have the following VB code that I would like to convert to the necessary
ASP code. The VB code is from a DLL that I am trying to debug by running the
DLL instructions as ASP code so I can insert debugging statements in my page
display:

ScriptObj.Drug.Add DrugObj, "drug1"

Both ScriptObj.Drug and DrugObj have been instantiated as classes using the
new Class object in VBScript 5.0

Thanks to all,
Marvin Pankaskie



Tue, 16 Sep 2003 02:13:09 GMT  
 Converting VB code to ASP code
Greetings!

If you are going to convert Class Modules into ASP code, and you are running
IIS 5.0 (with VB Script 5), you can to use the Class statement.  Use the
Class statement to declare a new class (as in VB 5). Then in your ASP code,
you could instantiate the class the same way you do in VB. Here is an
example.

<%
Class MyClass
    Public Function CanCallMe()
        CanCallMe = "You called me!"
    End Function

    Private Function CantCallMe()
        CantCallMe = "You cant call me!"
    End Function
End Class

Dim m_MyClass

Set m_MyClass = New MyClass

Response.Write(m_MyClass.CanCallMe)

Set m_MyClass = Nothing
%>

If you are running IIS 4 or or older, you are going to have to convert your
code so much to make it work, it might not even be worth it.

Why can't you debug in VB environment?

Just remember, you cannot use DataTypes in ASP!!!

Good Luck!

#BarnyMiler


Quote:
> I have the following VB code that I would like to convert to the necessary
> ASP code. The VB code is from a DLL that I am trying to debug by running
the
> DLL instructions as ASP code so I can insert debugging statements in my
page
> display:

> ScriptObj.Drug.Add DrugObj, "drug1"

> Both ScriptObj.Drug and DrugObj have been instantiated as classes using
the
> new Class object in VBScript 5.0

> Thanks to all,
> Marvin Pankaskie



Tue, 16 Sep 2003 06:36:43 GMT  
 Converting VB code to ASP code
ASP is not a language, it's a host environment that supports VBScript (among others).  

The "VB code" you posted is perfectly legitimate VBScript...

Unless there's something hiding in this question that I don't see ;-)...

--
Michael Harris
Microsoft.MVP.Scripting
--

Please do not email questions - post them to the newsgroup instead.
--

Quote:

> I have the following VB code that I would like to convert to the necessary
> ASP code. The VB code is from a DLL that I am trying to debug by running the
> DLL instructions as ASP code so I can insert debugging statements in my page
> display:

> ScriptObj.Drug.Add DrugObj, "drug1"

> Both ScriptObj.Drug and DrugObj have been instantiated as classes using the
> new Class object in VBScript 5.0

> Thanks to all,
> Marvin Pankaskie



Tue, 16 Sep 2003 07:00:47 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. command in ASP/VBscript to convert date and time into a Hex code, ASCII code

2. command in ASP/VBscript to convert date and time into a Hex code, ASCII code

3. Convert VB Automation code into VC++ code

4. Convert C Code to VB Code

5. vb.net code transform to asp.net code?

6. how to convert Sun/Mac-FrameMaker-Postscript-Code into Illustrator 88-PS-Code

7. A filter to convert 8-bit codes to octal escape codes

8. how to convert this js code to vb

9. how to convert this js code to vb

10. converting VB code to VBScript

11. Converting VB code to VBScript?

12. Convert hp basic code to visual basic code

 

 
Powered by phpBB® Forum Software