|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Open the excel in new page while exportingI have implemented export to excel functionality, which actually exports the contents of HTML table to a excel sheet and asks for user input on whether to open or save or cancel. The issue is when the user clicks on "Open", the excel is opened in the same window where it is being called or initiated, can i make it open in a new window? Right now this how my code looks, Context.Response.Clear(); //for displaying the open save dialogue box. Context.Response.AddHeader("content-disposition", "inline;filename=ExportContents"); Context.Response.Charset = ""; //set the target file type as excel. Context.Response.ContentType = "application/vnd.ms-excel"; and i'm using a StringBuilder class to get all the information from my HTML table and exporting to the excel by the following code, //write to the excel sheet Context.Response.Write(sb.ToString()); Context.Response.End(); -Chandra
Conditional True/False output for datalist item
error: can't find control 'mylabel' which expert can finally solve this? WSS document event handler that will use System.web.mail sendmail Disappearing Web Part Trick data inserted again after refresh Center Login Control and Firefox Admin front end generator How to access a server control within a repeater control Using Control.Render() from a page with a MasterPage |
|||||||||||||||||||||||