xml in a

  • Thread starter claudia villatoro via .NET 247
  • Start date
C

claudia villatoro via .NET 247

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()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,431
Messages
2,571,678
Members
48,796
Latest member
Greg L.

Latest Threads

Top