in vb.net how to open a file from file download prompt without askinguser to save it or run it....ju

K

Kaustubh Budukh

I am designing a VB.NET based website

I have a hyperlink, upon clicking on it a "File Download" prompt opens
which asks me

whether I want to "Save" the file, "Open"

But I want it to directly open in Internet Explorer without showing
the prompt....

How can i do this? It should not show any prompt... when i click on
the hyperlink....it should directly open in a new IE window....

Thanks....
 
M

Marc Gravell

What is the file? You might be able to use the content-disposition:
inline header, along with the content-type header (to tell it how to
open it) to do this, but IE will only trust certain recognised files -
it won't simply open an exe / .vbs / etc.

Marc
 
K

Kaustubh Budukh

Thank you very much Marc for your reply.

I want to open Excel file in new Internet Explorer and it should open
without asking user to save it as well as this should be non-editable.

Will you please give some runnable code in detauil and the steps
needed to follow?

Thank you very much!

Kaustubh
 
K

Kaustubh Budukh

Thank you very much Marc for your reply.

I want to open Excel file in new Internet Explorer and it should open
without asking user to save it as well as this should be non-editable.

Will you please give some runnable code in detauil and the steps
needed to follow?

Thank you very much!

Kaustubh

One more thing I forgoten to tell that I am going to open the file
when the hyperlink is clicked, note that I am not using the link
button.I heard that Content Disposition can be used for the Link
Button only and not for the hyperlink.
So please clarify my doubts.

Thanks!
 
M

Marc Gravell

Content-Disposition is a response header issued by the server and
interpreted by the client. It doesn't care much what the request is.

Marc
 

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

Top