Author: cubangt | Posted on: 7/26/2009 1:02:30 AM | Views : 888

 I have 1 checkboxlist on my page and has 4 options to check...could be all, few or none..
I need to capture all selection so i can email them to the client. Below is my code that i had working until i tried to add in the checkboxlist values.
I underlined the variable that is getting the error which is "Use of Unassigned Local variable 'reqinfo'  "
 
MailMessage mailMsg = new MailMessage();
MailAddress mailAdd = new MailAddress("info@homes.com");
MailAddress mailBCC = new MailAddress("dan@coyyy.com");
MailAddress mailTo = new MailAddress(email.Text.ToString());
string reqinfo;
foreach (ListItem li in info_type.Items)
{
      if (li.Selected)
{
       reqinfo = li.Value;
}
}
string tbody;
tbody = "Thank you for your request. You will rece ...

Go to the complete details ...