In some case, you need to supply different client-side components based on browser dependencies. By using ASP's BrowserType server Object, you can implement both types of client side components, Java Applets or Active-X Controls.
Example:
<%
'--- Create an instance of the Standard IIS Server Component.
'--- This component uses the Browsercap.ini to obtain browser capabilities.
Set Browse = Server.CreateObject("MSWC.BrowserType")
'--- If the browser supports Active-X Controls, SA-XFile is used.
If Browse.ActiveXControls Then
' SA-Xfile Code
'--- If the browser does not support ActiveX Controls, SA-JFile is used.
Else
'SA-JFile Code
End IF
%>
This can also be applied to downloading. Check out the samples provided as part of the
| Previous Page | Next Page |