tags:

views:

49

answers:

1

Hi, we have image files in IIS6.0 server, and wanted to open in browser using ASP.NET2008.

My problem is that it always shows the open/saveas dialog, but what I wanted is, it should open the file in the browser directly. we are using ASP.NET2008. It would be great if you provide the sample code.

thanks

+1  A: 

You could try to embed those file(s) into a simple HTML page. This will make browsers display it without prompting the user.

Making your code output bare bones like:

<html>
<head><title>YOUR_IMAGE_NAME</title></head>
<body>
  <img src = 'YOUR_IMAGE' alt='YOUR IMAGE DESC' />
</body>
</html>

to the browser should be sufficent.

HTH

KB22