<%if CertLoc&"" <> "" then %>
<img src="../../../../MImage/HCert/<%=CertLoc%>" style="height: 102px; width: 100px"></img><br>
<a href = "../../../../MImage/HCert/<%=CertLoc%>" name=" link" target="_blank"><%=CertLoc%></a><br>
<%end if%>


Above are the code, right now i want to get the extension value ".pdf " . if the value CertLoc file ".pdf" i want to display the link else i want to display the image. if anyone know how to get the file value in asp please help me.