2
Answers

Conversion problem

Mahesh Babu

Mahesh Babu

13y
1.4k
1
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)