Platform SDK: Exchange 2000 Server

Displaying Items

[This is preliminary documentation and subject to change.]

This Active Server Page example (render.asp) renders item content from a selection made in navigate.asp as described in the Navigating Folders programming task.

[VBScript]
'*************************************************
'Save this code as render.ASP
'*************************************************
//-->


<%

Dim iMsg
Dim Rc
Dim strItemURL
Dim iApt
Dim Strm

Set Rc = CreateObject("ADODB.Record")

strItemURL = Request.QueryString("f")

Rc.Open strItemURL

Select Case Rc.Fields("urn:schemas:mailheader:content-class").Value
   Case "urn:content-classes:document"
      Response.Write "Sorry, under construction"
   Case "urn:content-classes:appointment"
      Response.Write "Sorry, under construction"
   Case Else
      Set iMsg = CreateObject("CDO.Message")
      iMsg.DataSource.Open strItemURL
%>

<TABLE BORDER=3 cellpadding=3 cellspacing=3 width=700>
<TR>
<TD><FONT FACE=ARIAL color=Blue><B>From</B></TD><TD><FONT FACE=ARIAL><%= iMsg.From %></TD></TR>
<TD><FONT FACE=ARIAL color=Blue><B>To</B></TD><TD><FONT FACE=ARIAL><%= iMsg.To %></TD></TR>
<TD><FONT FACE=ARIAL color=Blue><B>Received</B></TD><TD><FONT FACE=ARIAL><%= iMsg.ReceivedTime %></TD></TR>
<TD><FONT FACE=ARIAL color=Blue><B>Subject</B></TD><TD><FONT FACE=ARIAL><B><%= iMsg.Subject %></B></TD></TR>
</TABLE>
<TABLE BORDER=3 cellpadding=3 cellspacing=3 width=700>
<TR><TD>
<FONT FACE=ARIAL>

<%
Response.Write iMsg.HTMLBody

End Select

Set iMsg = Nothing
Set Rc = Nothing
Set con = Nothing
Set RsM = Nothing

%>

</TD></TR>
</TABLE>

<!--