I don't have grid view as I am working on asp.net MVC.
So can I create Response object which writes data into pdf format
Response.AddHeader("Content-Disposition", "attachment; filename=data.pdf");
Response.ContentType = "application/.pdf";
I use these two lines but I don't know in which format, I should write data?