Dim mg As MsgBody = New MsgBody
s.WriteLine("<a href=ConsoleApplication1.exe?PFolder=oPFolder&SFolder=sfolder&oMsg=i>" + oMsg.Subject + "</a>")
I want to call following function in abo ve href

Public Class MsgBody

Public Function message(ByVal PFolder As String, ByVal SFolder As String, ByVal msg As Integer) As String

how can do this?


Dim mg As MsgBody = New MsgBody
s.WriteLine("<a href=ConsoleApplication1.exe?PFolder=oPFolder&SFolder=sfolder&oMsg=i>" + oMsg.Subject + "</a>")
I want to call following function in abo ve href

Public Class MsgBody

Public Function message(ByVal PFolder As String, ByVal SFolder As String, ByVal msg As Integer) As String

how can do this?

Your console app probably has subroutine called Main() that can instantiate the class MsgBody and then call the member function message().

e.g., From Module1.vb:

Sub Main(Byval arg() as String)
' add code here to parse the command line arguments
' stored in the array arg()

' assume that the class MsgBody has been added to the project
' or scope
Dim MyMsgbody as new MsgBody
Mymsgbody.message (command line arguments go here)

End Sub

Just be aware that calling an executeable (eg, ConsoleApp1.exe) from a URL is generally a bad idea since it's a security vulnerability, so you might want to put a web "wrapper" around it.

This article has been dead for over six months. Start a new discussion instead.