|
I have a form (http://www.readwritenow.org/pages/vo...ntakeForm.aspx) the
results of which need to be e-mailed. The checkBoxList control is populated manually, there is no database involved. In the interest of your time, I have removed the textBoxes and dropDownLists from the .cs below since they behave perfectly. The problem I am having is the checkBoxList control is returning only the first checked selected item, not all items selected. I'm a newbe and in over my head, so please treat your response accordingly. Thanks for your help! using System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Net.Mail; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial class pages_volunteerIntakeForm : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void sendButton_Click(object sender, EventArgs e) { successLabel.Text = "Thanks for your interest, " + firstNameTextBox.Text + ". Your information has been sent, and we'll be contacting you soon!"; MailMessage message = new MailMessage(); message.From = new MailAddress("[email protected]"); message.To.Add(new MailAddress("[email protected]")); message.Subject = "Volunteers Intake Form"; message.IsBodyHtml = true; message.Body = " Volunteer Intake Form"+"Preferences " + "Would like to tutor at: " + tutorAtCheckBoxList.Text + " " + "Days and times available: " + timesAvailableCheckBoxList.Text + " " + "Interested in working with: " + workChoicesCheckBoxList.Text + " " + "Can help in other areas: " + alsoHelpCheckBoxList.Text + " " + "Learner preference: " + learnerPreferenceDropDownList.Text + " " + "Skills, experience and background br />" + commentsTextBox.Text; SmtpClient client = new SmtpClient(); client.Send(message); } } | |
|
Loading
br />" 

ArshadPosted May 13, 2008, 5:05 PM
With Regards
Khan
David LindelofPosted May 13, 2008, 4:55 PM
Again, many thanks!!
Anna HawksPosted May 13, 2008, 3:37 PM
http://forums.asp.net/p/1254139/2326323.aspx