title: Cannot convert type 'System.Web.UI.WebControls.ListItem' to 'System.IO.DriveInfo'
body: <pre><code> foreach(DriveInfo di in DriveInfo.GetDrives())
          {
              lstdrive.Items.Add(di.ToString());
  
          }
  
       lstfolder.Items.Clear();
          try
          {
              DriveInfo drive =(DriveInfo)lstdrive.SelectedItem;
              foreach (DriveInfo diInfo in drive.RootDirectory.GetDirectories())
              {
                  lstfolder.Items.Add(diInfo.ToString());
              }
          }
          catch (Exception ex)
          {
  
              throw ex;
          }
  </code></pre>
  
  <p>error Error 3   Cannot convert type 'System.Web.UI.WebControls.ListItem' to 'System.IO.DriveInfo'   </p>