locked
TIFF files not rendering in IE8 RRS feed

  • Question

  • User-203754430 posted

    I have an ASP.NET program written in VB that renders or displays a tiff image without issue. However when users with IE8 try to view the same tiff they get to see the HTML code instead. I tried implementing the meta tag for IE7 compatibility but it still doesn't work. I attached the HTML code 

    <META content=IE=EmulateIE7> <META content="Microsoft Visual Studio.NET 7.0" name=GENERATOR> <META content="Visual Basic 7.0" name=CODE_LANGUAGE> <META content=JavaScript name=vs_defaultClientScript> <META content=http://schemas.microsoft.com/intellisense/ie5 name=vs_targetSchema> <FORM id=Form1 method=post runat="server">

    <%@ Page Language="vb" AutoEventWireup="false" Codebehind="Image.aspx.vb" Inherits="specialtylookup.Image" %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
    <HTML>
    	<HEAD>
    		<title>Image</title>
    		<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
    		<meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0">
    		<meta name="CODE_LANGUAGE" content="Visual Basic 7.0">
    		<meta name="vs_defaultClientScript" content="JavaScript">
    		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
    	</HEAD>
    	<body MS_POSITIONING="GridLayout">
    		<form id="Form1" method="post" runat="server">
    			<asp:PlaceHolder id="PlaceHolder1" runat="server"></asp:PlaceHolder>
    		</form>
    	</body>
    </HTML>
    
        Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
            Response.ContentType = "image/jpeg"
            SelectCommand = "select * " _
                        & "from [expert_cv_path] "
    
            Dim myConnection As New SqlConnection(ConnectionString)
            Dim myCommand As New SqlDataAdapter(SelectCommand, myConnection)
    
            Dim ds As New DataSet()
            myCommand.Fill(ds)
    
            Dim picPath As String
            strServerPath = Server.MapPath("~")
    
            strFileName = Request.QueryString("strFileName")
            'picPath = ds.Tables(0).Rows(0)("FilePath") & strFileName
            picPath = strServerPath & "\CV\" & strFileName
    
            Dim width As Integer = 750
            Dim height As Integer = 900
    
            Dim myimg As Bitmap
            myimg = New Bitmap(picPath)
    
            Dim oFDimension As System.Drawing.Imaging.FrameDimension
            oFDimension = New System.Drawing.Imaging.FrameDimension _
            (myimg.FrameDimensionsList(0))
    
            Dim iCount As Integer = myimg.GetFrameCount(oFDimension)
            Dim image1 As System.Web.UI.WebControls.Image
    
            For iCount = 0 To myimg.GetFrameCount(oFDimension) - 1
                'Add new Image
                image1 = New System.Web.UI.WebControls.Image()
                image1.ID = "imageD" & iCount
                image1.ImageUrl = "cv.aspx?strFileName=" & strFileName & "&strPageNumber=" & iCount
                'image1.Height = unit.pixel(373)
                'image1.Width = unit.pixel(482)
                PlaceHolder1.Controls.Add(image1)
            Next
        End Sub


    Thanks

    Dagdason

    Extinction level events are God's reset buttonCool

    </FORM>
    Friday, October 23, 2009 6:40 PM

Answers

All replies