Cita:  
					Iniciado por roly0476  
  Aún sigo perdido, intente hacer un if de esta forma pero no funciona se salta todo y sale el mensaje que puse.
 
If dt.Rows.Count < 1 Then
            Response.End()
        Else
            If Response.ContentType = "image/pjpeg" = True Then
                Response.BinaryWrite(CType(dt.Rows(0)(10), Byte()))
            Else
                Response.Write("No hay Data")
            End If
            If Response.ContentType = "image/gif" = True Then
                Response.BinaryWrite(CType(dt.Rows(0)(10), Byte()))
            Else
                Response.Write("No hay Data")
            End If
            If Response.ContentType = "application/vnd.ms-excel" = True Then
                Response.BinaryWrite(CType(dt.Rows(0)(10), Byte()))
            Else
                Response.Write("No hay Data")
            End If
            If Response.ContentType = "application/msword" = True Then
                Response.BinaryWrite(CType(dt.Rows(0)(10), Byte()))
            Else
                Response.Write("No hay Data")
            End If
            If Response.ContentType = "application/x-excel" = True Then
                Response.BinaryWrite(CType(dt.Rows(0)(10), Byte()))
            Else
                Response.Write("No hay Data")
            End If
End if
 
puede que este método sea mediocre ustedes me lo dirán.
 
gracias...
    **************************************************  ******* 
Solo recuerda las jerarquias de operadores... al entrar al primer IF y detectar q no es un .jpg te escribirá "NO HAY DATA" y 'brincaría' al siguiente IF a detectar si es el sig tipo de archivo, y si aun no es .gif te volvería a mandar el msj "NO HAY DATA"... 
Deja checo unas cosas y si encuentro algo más q te pueda ayudar, te posteo again... 
Have a nice day 
