I have a page with an option for exporting a xml file to excel, It works but It open in the current page, I'd like to open it in a new page, How can I do ?
I use this code for this case
Response.ContentType = "application/vnd.ms-excel"
Response.Charset = ""
' recuperar el dataset y asociarlo al xml
xdd = New XmlDataDocument(Session("dtsReportes"))
' nueva linea PARA INSTANCIAR EL PARAMETRO
xal = New XsltArgumentList()
xal.AddParam("title", "", "Estadistica " & ddlReportes.SelectedItem.Text)
xal.AddParam("usuario", "", "Usuario:" & Session("UA"))
xal.AddParam("fecha", "", "Fecha :" & Format(Now, "dd/MM/yyyy"))
xal.AddParam("periodo", "", fecha)
xal.AddParam("total", "", "Total :" & CStr(lblCantidad.Text))
' transformar a xml segun la plantilla ExcelTitle.xsl
xtt = New Xsl.XslTransform()
xtt.Load(Server.MapPath("ExcelTitle.xsl"))
xtt.Transform(xdd, xal, Response.OutputStream)
Response.End()
--------------------------------
From: claudia villatoro
-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)
<Id>5Ti/8LTjdEKf+4I79lgPGA==</Id>