Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > ASP.NET 4 General Discussion
|
ASP.NET 4 General Discussion For ASP.NET 4 discussions not relating to a specific Wrox book
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 4 General Discussion section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 23rd, 2011, 08:02 PM
Registered User
 
Join Date: Mar 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Sending One Single Email for multiple radio button selections

Hello. I am designing my first asp web form for my company intranet. I have a checklist form designed with Yes and No selections using Radio Buttons. I need to be notified by email for any "No" selections. I have the code to send email, however using (If, Then) I get an email for each No selection. I would like to receive one email for each form submission. Can anyone help me out? Thanks in advance.

The code I am using to send email is:

Code:
 If RadioButton.Checked = True Then
      CreateEmail()
    End If
 
Old March 24th, 2011, 03:20 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

What about Or?

Code:
If RadioButton1.Checked = True Or RadioButton2.Checked = True Or RadioButton3.Checked = True Then
  CreateEmail()
End If
This would call CreateEmail() when one or more of the radio buttons are checked.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old March 24th, 2011, 11:53 AM
Registered User
 
Join Date: Mar 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks so much! That works just like I need it to!





Similar Threads
Thread Thread Starter Forum Replies Last Post
Dropdown list with multiple selections tombert ASP.NET 1.0 and 1.1 Basics 15 March 7th, 2007 07:38 PM
DropDown list selections with IE Back button Dawn_B ASP.NET 1.0 and 1.1 Basics 0 May 3rd, 2006 11:57 AM
Multiple event handlers for a single button monuindia2002 ASP.NET 1.0 and 1.1 Professional 1 October 16th, 2005 11:22 PM
Select Menu Multiple Selections phungleon HTML Code Clinic 2 July 20th, 2004 12:25 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.