Assonet River Design Group : Portfolio : Code Snippets : Resume : Contact

MIME Types : MS-Excel Code View
ASP Server Behavior for Dreamweaver UltraDev

This UltraDev server behavior for ASP inserts the code above the <HTML> tag at top of page.

Only use one MIME or Content Type per page!

Click to view sample output

-------------------------------------------------------

<%@LANGUAGE="VBSCRIPT"%>
<%
' Tells the browser to open table using MS-Excel
Response.ContentType = "application/vnd.ms-excel"
%>

<html>
<head>
<title>Excel MIME Type Example</title>

</head>
<body>
<!-- Sample Table with Data -->
<table border="0" cellspacing="1" cellpadding="1">
<tr bgcolor="#999999">
<td><b>Remote Address</b></td>
<td><b>HTTP User Agent</b></td>
<td><b>Date</b></td>
<td><b>Server Software</b></td>
</tr>
<tr>
<td>
<% =Request.ServerVariables("REMOTE_ADDR") %>
</td>
<td>
<% =Request.ServerVariables("HTTP_USER_AGENT") %>
</td>
<td>
<% = Date() %>
</td>
<td>
<% =Request.ServerVariables("SERVER_SOFTWARE") %>
</td>
</tr>
</table>
</body>
</html>