W
Wayne Wengert
I am trying to use the HttpUtility methods shown below in a Windows Form. I
cannot get Intellisense to accept the code - I've used Imports System.Web
and I also tried adding the specific name space qualifiers with the same
results? I am wondering if there is some restriction on using this in a
Windows Form?
==============================
Public Sub StartDefaultMail( _
ByVal [To] As String, _
Optional ByVal Subject As String = "", _
Optional ByVal Message As String = "" _
)
Try
Dim psi As New ProcessStartInfo
psi.UseShellExecute = True
psi.FileName = _
"mailto:" & System.Web.HttpUtility.UrlEncode([To]) & _
"?subject=" & HttpUtility.UrlEncode(Subject) & _
"&body=" & HttpUtility.UrlEncode(Message)
Process.Start(psi)
Catch ex As Exception
Throw _
New Exception( _
"Default mail client could not be started.", _
ex _
)
End Try
End Sub
cannot get Intellisense to accept the code - I've used Imports System.Web
and I also tried adding the specific name space qualifiers with the same
results? I am wondering if there is some restriction on using this in a
Windows Form?
==============================
Public Sub StartDefaultMail( _
ByVal [To] As String, _
Optional ByVal Subject As String = "", _
Optional ByVal Message As String = "" _
)
Try
Dim psi As New ProcessStartInfo
psi.UseShellExecute = True
psi.FileName = _
"mailto:" & System.Web.HttpUtility.UrlEncode([To]) & _
"?subject=" & HttpUtility.UrlEncode(Subject) & _
"&body=" & HttpUtility.UrlEncode(Message)
Process.Start(psi)
Catch ex As Exception
Throw _
New Exception( _
"Default mail client could not be started.", _
ex _
)
End Try
End Sub