Mahesh Babu

Mahesh Babu

  • NA
  • 1.7k
  • 367.6k

Conversion problem

May 29 2011 3:03 AM
This is my code.

  GridView1.DataSource = Session["Seats"];
  DataSet ds3 = new DataSet();
  ds3 = (DataSet)GridView1.DataSource;


When I am trying to convert gridview to dataset I got one error .
i.e
  Unable to cast object of type 'System.Collections.Generic.List`1[System.String]' to type 'System.Data.DataSet'.

How to solve this problem.

Answers (2)