How to generate the data from grid view to excel
My Requirement is
How to generate the data from gridview to excel
i created my datatable
i need to generate the data randomly when i click the button to the excel
below u can find the code
private DataTable GetDetails(int id)
{
_dt = new DataTable();
_da = new SqlDataAdapter("sp_GetDetails", _con);
_da.SelectCommand.Parameters.AddWithValue("@id", id);
_da.SelectCommand.CommandType = CommandType.StoredProcedure;
_dt.Clear();
_da.Fill(_dt);
return _dt;
}
please help me this
Thanks
Leon DPosted Aug 30, 2018, 1:04 AM
Chandan PrasadPosted Aug 30, 2018, 12:09 AM
Aakash MauryaPosted Aug 29, 2018, 2:50 AM