Click here to Skip to main content
15,887,214 members
Home / Discussions / Visual Basic
   

Visual Basic

 
Generalrowstate changes when sybasecommandbuilder is created Pin
CodeAgnostic14-May-04 9:59
CodeAgnostic14-May-04 9:59 
GeneralConvert e to uppercase Pin
XGaMeS14-May-04 8:46
XGaMeS14-May-04 8:46 
GeneralRe: Convert e to uppercase Pin
Aaron Eldreth14-May-04 10:09
Aaron Eldreth14-May-04 10:09 
GeneralRe: Convert e to uppercase Pin
XGaMeS17-May-04 2:46
XGaMeS17-May-04 2:46 
Generalhelp sending a form to bottom Pin
Stanimir_Stoyanov14-May-04 6:37
Stanimir_Stoyanov14-May-04 6:37 
GeneralRe: help sending a form to bottom Pin
f6414-May-04 7:51
f6414-May-04 7:51 
Generalsending email base on radiobuttonlist selection Pin
devgeez14-May-04 5:49
devgeez14-May-04 5:49 
GeneralRe: sending email base on radiobuttonlist selection Pin
Mike Ellison14-May-04 6:34
Mike Ellison14-May-04 6:34 
Hi there. Well, in your code you're using a CheckBoxList object... do you want a RadioButtonList instead? If you have a single selected value (as in a RadioButtonList) you could use the following code to get it:
Dim sValue as String = chkcomm.SelectedValue
Or for multiple selections (as in a CheckBoxList) you could enumerate through the items to see which are selected with code like this:
Dim i as Integer
For i = 0 to chkcomm.Items.Count - 1
    If chkcomm.Items(i).Selected Then
        '... do something with the selected item...
    End If
Next
To send the email, investigate the System.Web.Mail namespace. Here's a simple example:
Imports System.Web.Mail
 
Sub SendAMessage(sSendTo as string, sSubject as string, sBody as string)
    Dim mm as MailMessage = new MailMessage()
    
    '--set message properties
    mm.From    = "me@mycompany.com"
    mm.To      = sSendTo
    mm.Subject = sSubject
    mm.Body    = sBody
     
    '--set the SMTP server that will handle the outgoing message
    SmtpMail.SmtpServer = "mycompany.com"
     
    '--send the message
    SmtpMail.Send(mm)
     
End Sub
In your case, you would probably use a Select Case...End Select block to set up the .To property, based on the selected values. If you want more examples just do a search on CodeProject.
GeneralRe: sending email base on radiobuttonlist selection Pin
devgeez21-May-04 3:41
devgeez21-May-04 3:41 
GeneralRe: sending email base on radiobuttonlist selection Pin
Mike Ellison21-May-04 4:21
Mike Ellison21-May-04 4:21 
GeneralRe: sending email base on radiobuttonlist selection Pin
devgeez21-May-04 4:31
devgeez21-May-04 4:31 
GeneralRe: sending email base on radiobuttonlist selection Pin
Mike Ellison21-May-04 6:28
Mike Ellison21-May-04 6:28 
GeneralFile Stream Headache Pin
BMS581914-May-04 5:01
BMS581914-May-04 5:01 
GeneralRe: File Stream Headache Pin
Anonymous16-May-04 11:11
Anonymous16-May-04 11:11 
GeneralRe: File Stream Headache - Permissions Problem ? Pin
BMS581917-May-04 3:34
BMS581917-May-04 3:34 
GeneralPjGrid.ocx - Dragging Tasks Pin
mac_hua14-May-04 3:30
mac_hua14-May-04 3:30 
GeneralSetup project for BHO Pin
Member 86274214-May-04 0:27
Member 86274214-May-04 0:27 
GeneralHelp....Datagrid and Ado question Pin
Anonymous13-May-04 23:38
Anonymous13-May-04 23:38 
GeneralHardware configuration Pin
pasho13-May-04 17:16
pasho13-May-04 17:16 
GeneralRe: Hardware configuration Pin
superwinsock13-May-04 22:31
superwinsock13-May-04 22:31 
GeneralRe: Hardware configuration Pin
Dave Kreskowiak14-May-04 8:11
mveDave Kreskowiak14-May-04 8:11 
GeneralRe: Hardware configuration Pin
pasho14-May-04 16:34
pasho14-May-04 16:34 
GeneralRe: Hardware configuration Pin
pasho14-May-04 16:38
pasho14-May-04 16:38 
GeneralMouse Wheel Scroll event in crystal report viewer Pin
Asif Rehman13-May-04 16:53
Asif Rehman13-May-04 16:53 
Generalstreamwriter problem Pin
Xun Ding13-May-04 9:50
Xun Ding13-May-04 9:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.