title: Input string was not in correct format.How to correct it?
body: <p>I have a requirement where i have to remove the drop down items depending upon the start date and end date.
  The issue here is, It throws error that input string was not in correct format.</p>
  
  <pre><code>foreach (SPListItem oSPListItemCourse in oSPListItemCollectionCourse)
  {
  string begginingDate = oSPListItemCourse["Start Date"].ToString();
  string finishDate = oSPListItemCourse["End Date"].ToString();
  if (( Convert.ToInt32(begginingDate)&gt;=Convert.ToInt32(TxtStartDate.Text) ) || (Convert.ToInt32(finishDate)&lt;= Convert.ToInt32(TxtEndDate.Text)))//input string not in correct format
  {
  ddlDrop.Items.Remove(ddlDrop.SelectedItem);//how to remove the item from drop down if their date is greater than StartDate and less than EndDate
  }
  }
  </code></pre>