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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.