Embed Meeting List in an Asp.Net site
The following approach was used with the Alabama Section Site:
Add the following code to the front of the page:
<%@ Import Namespace="System" %>
<%@ Import Namespace="System.Net" %>
<%@ Import Namespace="System.IO" %>
<%@ Import Namespace="System.Text.RegularExpressions" %>
<script language="VB" runat="server">
Sub Page_Load(Sender as Object, E as EventArgs)
Dim r as String
Try
Dim oRequest As WebRequest = WebRequest.Create("http://meetings.vtools.ieee.org/meetings/R30001/-0/365")
Dim oResponse As WebResponse = oRequest.GetResponse()
Dim oStream As Stream = oResponse.GetResponseStream()
Dim oStreamReader As New StreamReader(oStream, Encoding.UTF8)
r = oStreamReader.ReadToEnd()
oResponse.Close()
oStreamReader.Close()
Catch wex as WebException
r = "OU Management Feed is unavailable at this time"
Finally
End Try
' change href="/*" to href="http://meetings.vtools.ieee.org/*"
'
Dim rgExp As New Regex("href=""/" , RegexOptions.IgnoreCase ) '' | RegexOptions.Global )
lblHTMLOutput.text = rgExp.Replace(r, "href=""http://meetings.vtools.ieee.org/")
End Sub
</script>
Note that the URL
http://meetings.vtools.ieee.org/meetings/R30001/-0/365 requests information about the
Section corresponding to the
GeoCode R30001 (Alabama Section) from -0 days ago to 365 days in the future.
This will return all qualifying Section/Chapter/Affinity Group meetings in this range that have been marked
as published by the section volunteer using the meetings.vtools.ieee.org interface.
In the header section of the HTML file put in the following additional style information and adjust as appropriate.
Some example formatting is shown but it is strictly up to the hosting site to format as appropriate.
<style type="text/css" media="screen">
<!--
/* Styles from meetings feed */
.meetingTable { }
.meetingTable td,th { padding:8px;}
.meetingHeaderRow { background-color: #8BB1B1;}
.meetingRow {}
.meetingDate {}
.meetingLinkedName {}
.meetingDescription {} /* unused */
-->
</style>
Then, where you want the table of information of about the meetings to occur put
<asp:label id="lblHTMLOutput" runat="server" />
When the web page is loaded, it will make an inquiry of the meetings.vtools.ieee.org server at IEEE and substitute
information from that server. It will look something like:
<span id="lblHTMLOutput">
<div id="meetings">
<table class="meetingTable" border cellpadding="2" width="100%" col>
<tr class="meetingHeaderRow"><th>Date</th><th>Event Title</th><th>Speaker(s)</th></tr>
<tr class="meetingRow">
<td class="meetingDate">
10 September 2007 05:10PM
</td>
<td class="meetingLinkedName">
<a href="http://meetings.vtools.ieee.org/meeting_view/list_meeting/12" target="_blank">September Section Meeting: F-117 Stealth Fighter Project</a>
</td>
<!-- <td class="meetingDescription">
<b>Come and meet the Control System Team Leader for the F-117 Stealth Fighter Project</b>
</td> -->
<td>
Eldred "Don" Merkl
</td>
</tr>
</table>
</div>
</span>
or
Note the (sic) span tag over the whole range is inserted by Microsoft and is probably a misuse of the
control chosen. In this example, only one meeting is in the system. More would be rows would be present
if more information was available in meetings.vtools.ieee.org.
The Alabama Section site is somewhat involved using frames and such but the meeting information corresponding
to the above looks like:
Alabama Site Example:
--
DavidGreen - 02 Sep 2007, 04 Aug 2008