Click here to Skip to main content
15,902,032 members

Comments by OtroCubaLibre (Top 6 by date)

OtroCubaLibre 17-Oct-12 14:49pm View    
Hi Rohit, thank you very much for the ideas, help me a lot to understand the problem, I finally use the response to render the page, but I needed to be in other window (and I could'n write the download handler), so I added this in the button

OnClientClick="aspnetForm.target ='_blank';setTimeout('fixform()', 50);"

then I used the call with a redirect

Response.Redirect("ShowReport.aspx")

and in the top of the page insert,

function fixform() {
document.getElementById("aspnetForm").target = '';
}
to put back the target of the form to _self.

(this solution I also find it on the web, it's not mine.)
problem solved.
thanks again.
Cubas
OtroCubaLibre 16-Oct-12 12:17pm View    
Hi, these are the headers after deleting, I also try adding the expires header and is the same. Automatic prompting for file download is disable, but I can't change nothing in the Ie configuration of the client.


Request Headers

GET /.../appData/prueba.pdf HTTP/1.1
Accept: */*
Accept-Language: en-us
UA-CPU: x86
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)
Host: ssti06
Connection: Keep-Alive



Response Headers

HTTP/1.1 200 OK
Content-Type: application/pdf
Last-Modified: Wed, 12 Sep 2012 18:15:34 GMT
Accept-Ranges: bytes
ETag: "e433319a1291cd1:0"
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Date: Tue, 16 Oct 2012 15:41:49 GMT
Content-Length: 2670

OtroCubaLibre 16-Oct-12 10:55am View    
You are right, I'm new in fiddler, this would be the correct header. thanks again.

Request Headers

GET /.../appData/prueba.pdf HTTP/1.1
Accept: */*
Accept-Language: en-us
UA-CPU: x86
Accept-Encoding: gzip, deflate
If-Modified-Since: Wed, 12 Sep 2012 18:15:34 GMT
If-None-Match: "e433319a1291cd1:0"
User-Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 2.0.50727)
Host: ssti06
Connection: Keep-Alive


Response Headers

HTTP/1.1 304 Not Modified
Last-Modified: Wed, 12 Sep 2012 18:15:34 GMT
Accept-Ranges: bytes
ETag: "e433319a1291cd1:0"
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Date: Tue, 16 Oct 2012 13:52:16 GMT
OtroCubaLibre 16-Oct-12 10:29am View    
Hi Bhushan, I tried your solution and is the same, in fact in the fiddlers both calls have the same headers.


Response.Write("<script>window.open('appData/prueba.pdf','pruebapdf','location=no,resizable=yes,scrollbars=yes');</script>")

Page.ClientScript.RegisterStartupScript(Me.GetType(), "click", "<script>window.open('appData/prueba.pdf','pruebapdf1','location=no,resizable=yes,scrollbars=yes');</script>")
OtroCubaLibre 16-Oct-12 10:23am View    
Hi, thanks for the response, yes I used "application/pdf" for pdf and "application/vnd.ms-excel" for excel.