Author: cm1924 | Posted on: 3/12/2010 1:55:56 AM | Views : 452

How to assign a array string session to dataset or datatable? I have a array session data in that i stored n number of  values. i want to assign these values to dataset. so that i can bind these values to gridview. so anyone pls let me know how to do this? Iam getting error to convert sesion{"noncontractitem"] to datatable.



string[] sessiondata = { txtProductNo.Text, txtItemDescription.Text, ddlUnitOfMeasure.Text, ddlDistributor.Text, rbtlItemType.Text, txtQnty.Text, txtPacking.Text, txtUnitCost.Text };
        Session["NoncontractItem"] = sessiondata;
        DataTable dts = new DataTable();
        dts = (DataTable)Session["NoncontractItem"];
        grdSelectedItems.DataSource = dts;
        grdSelectedItems.DataBind();
...

Go to the complete details ...