[thelist] ASP.NET: testing an object for a value

Tom Dell'Aringa pixelmech at yahoo.com
Mon Mar 7 14:19:52 CST 2005

Hello again,

Still working on my form and have a question. I'm picking off the user's e-mail address from the
form like so (VB Script):

Dim objMM as New MailMessage()
objMM.From = txtEmail.Text

However,this is not required. But if they don't fill it in I get an error since the mail object (I
think) requires a sender.

How can I test objMM.From to see if it is blank, and if not supply a no-reply email like
(no-replay at somewhere.com) so the email fires off?

Also, I thought I saw somewhere there was a simple way to require fields in ASP.Net...




Melissa: Ace, Where are you?
Ace Ventura: I'm in Psychoville and Finkle's the Mayor.

More information about the thelist mailing list