Before downloading i show popup as Open Save Cancel.
When user click the Open the excel is file open.
The excel open code as follows
System.Threading.Thread.Sleep(3000);
System.IO.StringWriter sw = new System.IO.StringWriter();
HtmlTextWriter htw = new HtmlTextWriter(sw);
gvEmpdetails.AllowPaging = false;
BindGrid();
//Applying stlye to gridview header cells
for (int i = 0; i < gvEmpdetails.HeaderRow.Cells.Count; i++)
gvEmpdetails.HeaderRow.Cells[i].Style.Add("background-color", "#df5015");
gvEmpdetails.RenderControl(htw);
Session["ResponseData"] = sw.ToString();
iframe1.Attributes.Add("src", "Download.aspx");
Code
When user the Open button in the popup excel is openfor saving the excel file in specific how can i do
Shakti Singh DulawatRank #668 · 3.6K reputationPosted May 5, 2016, 4:55 AM EDT
Raja TRank #685 · 3.5K reputationPosted May 5, 2016, 6:18 AM EDT
Karthik ElumalaiRank #544 · 4.5K reputationPosted Jun 7, 2016, 2:23 AM EDT
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts