Can someone help me with this please? I have a form on a .NET webserver using aspx pages with the vb code-behind pages. The form collects the entered data and then emails it, that part works fine.
Right after it gets emailed, this code checks to see if the email was sent or not and then updates the landing page accordingly. I used to use just an IF THEN statement, but now that doesn't work in these new .NET pages.
Here's the end of the code that I am having difficulties with:
Specifically, this is the part that's throwing the error:Code:Try Mail.Send() Mail = Nothing Catch ex As Exception Response.Write("There has been an error and your message WAS NOT SENT through email." & Err.Description) Finally If Mail >= 1 Then Response.Write("It worked, your form has been submitted by email!!!") End If End Try
The error is:Code:If Mail >= 1 Then
Operator '>' is not defined for type 'IMailSend' and 'Nothing'
is there a better way to write this whole block of code?



Reply With Quote


Bookmarks