Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C# ASP.NET HTML
Hi
 
i want to know , how to view TIFF images in my page using asp.net c#
 
i was tried with this code
 
Response.ContentType = "image/tif";
Response.WriteFile(filepath);
Response.Flush();
Response.Close();
 
but this not display any image . its display open / save dialog
Posted 28-Mar-13 2:58am
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

I think, that the main problem is because browsers [^] don't support TIF images for inline viewing. I tried latest Chrome 26 and IE 10. It only works in Safari. To avoid this, use PNG instead or check the alternatiff.com[^] project for TIF support.
Also proper content-type should be image/tiff (with two 'F's).
  Permalink  
Comments
Sergey Alexandrovich Kryukov at 28-Mar-13 10:35am
   
Correct, a 5.
—SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Correct, adding images into the Response object will tell the browser to download them as a separate object and so you get the open save dialog.
 
All you need to do is add html img tags or asp.net image tags and set the src or imageurl to the url of the images.
  Permalink  
Comments
Darsh_Basha at 28-Mar-13 8:26am
   
@ryanb31
plz tell me more
ryanb31 at 28-Mar-13 8:32am
   
Have you ever created a web page? Adding img tags is trivial and is html 101. Please see http://www.w3schools.com/html/html_images.asp

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Kornfeld Eliyahu Peter 265
1 Sergey Alexandrovich Kryukov 202
2 George Jonsson 185
3 King Fisher 185
4 CPallini 155
0 OriginalGriff 6,223
1 DamithSL 4,724
2 Maciej Los 4,196
3 Kornfeld Eliyahu Peter 3,894
4 Sergey Alexandrovich Kryukov 3,496


Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 28 Mar 2013
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100