Hello. I have a dropDownList that populates GridView Datatable on IndexChange event. Obviously the gridview content changes as per the list selected in the dropDown! Now there is an option to export the gridView data to Excel but I wish the filename to be the listItem.xlsx/xls where listItem varies as per selection. Appreciate all your guidance. Sat
I am afraid, this doesn't address my issue. Thank you for your efforts though. Found below to resolve the same:
Response.AddHeader("content-disposition", string.Format("attachment; filename={0}.xls", DropDown1.Text));
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.