Author: ginger_asp | Posted on: 7/10/2009 8:55:46 AM | Views : 243

can someone help explain what this code is meant to do? i found an example where a page on pageload - pulls data out from database, show on gridview. one button then allows u to take that data to excel file.

HttpContext.Current.Response.Clear();
        HttpContext.Current.Response.AddHeader(
            "content-disposition", string.Format("attachment; filename={0}", fileName));
        HttpContext.Current.Response.ContentType = "application/ms-excel";


what do we use StringWriter and HtmlTextWriter for?


thanks!

...

Go to the complete details ...