Okay, So I'm now having trouble with how to create and display the link to the .ics file...
The .asp code is very long and complex, but here's the portion where I called the function to generate the calendar file, because I'm sure that the data is loaded into the variables from the database at this point.
Code:
'eventGrid Show Method @5-D26D48C9
Sub Show(Tpl)
Dim HasNext
If NOT Visible Then Exit Sub
Dim RowBlock
With DataSource
.Parameters("urlevent_id") = CCGetRequestParam("event_id", ccsGET)
.Parameters("seslocale") = Session("locale")
.Parameters("urlevents_category_id") = CCGetRequestParam("events_category_id", ccsGET)
End With
CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeSelect", Me)
Set Recordset = DataSource.Open(Command)
If DataSource.Errors.Count = 0 Then IsDSEmpty = Recordset.EOF
Set TemplateBlock = Tpl.Block("Grid " & ComponentName)
If TemplateBlock is Nothing Then Exit Sub
Set RowBlock = TemplateBlock.Block("Row")
Set StaticControls = CCCreateCollection(TemplateBlock, Null, ccsParseOverwrite, _
Array(event_title, edit))
event_title.Value = Recordset.Fields("event_title")
edit_event.Parameters = CCGetQueryString("QueryString", Array("ccsForm"))
edit_event.Parameters = CCAddParam(edit_event.Parameters, "event_id", CCGetRequestParam("event_id", ccsGET))
edit_event.Page = "events.asp"
Set RowControls = CCCreateCollection(RowBlock, Null, ccsParseAccumulate, _
Array(event_date, event_time, event_time_end, category_id, user_id, event_desc, PanelLocation, PanelCost, PanelURL, PanelTextBox1, PanelTextBox2, PanelTextBox3, PanelTextArea1, PanelTextArea2, PanelTextArea3, PanelCheckBox1, PanelCheckBox2, PanelCheckBox3))
CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShow", Me)
If NOT Visible Then Exit Sub
RowControls.PreserveControlsVisible
Errors.AddErrors DataSource.Errors
If Errors.Count > 0 Then
TemplateBlock.HTML = CCFormatError("Grid " & ComponentName, Errors)
Else
' Show NoRecords block if no records are found
If Recordset.EOF Then
TemplateBlock.Block("NoRecords").Parse ccsParseOverwrite
End If
HasNext = HasNextRow()
ForceIteration = False
Do While ForceIteration Or HasNext
If HasNext Then
event_date.Value = Recordset.Fields("event_date")
event_time.Value = Recordset.Fields("event_time")
event_time_end.Value = Recordset.Fields("event_time_end")
category_id.Value = Recordset.Fields("category_id")
user_id.Value = Recordset.Fields("user_id")
event_desc.Value = Recordset.Fields("event_desc")
event_Location.Value = Recordset.Fields("event_Location")
event_Cost.Value = Recordset.Fields("event_Cost")
event_URL.Value = Recordset.Fields("event_URL")
event_URL.Link = ""
event_URL.Page = Recordset.Fields("event_url")
event_TextBox1.Value = Recordset.Fields("event_TextBox1")
event_TextBox2.Value = Recordset.Fields("event_TextBox2")
event_TextBox3.Value = Recordset.Fields("event_TextBox3")
event_TextArea1.Value = Recordset.Fields("event_TextArea1")
event_TextArea2.Value = Recordset.Fields("event_TextArea2")
event_TextArea3.Value = Recordset.Fields("event_TextArea3")
event_CheckBox1.Value = Recordset.Fields("event_CheckBox1")
event_CheckBox2.Value = Recordset.Fields("event_CheckBox2")
event_CheckBox3.Value = Recordset.Fields("event_CheckBox3")
End If
CCSEventResult = CCRaiseEvent(CCSEvents, "BeforeShowRow", Me)
RowControls.Show
If HasNext Then Recordset.MoveNext
ShownRecords = ShownRecords + 1
HasNext = HasNextRow()
Loop
StaticControls.Show
End If
generateCalendarFile
End Sub
'End eventGrid Show Method
So I'm thinking that I should somehow create a link to the file in there somewhere. Here's the HTML:
Code:
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>{event_name}</title>
<meta content="CodeCharge Studio 3.0.2.2" name="GENERATOR">
<link media="screen" href="Styles/{CCS_Style}/Style.css" type="text/css" rel="stylesheet">
<link media="print" href="ccsprint.css" type="text/css" rel="stylesheet">
<script language="JavaScript">
function parent_redirect(url) {
window.opener.location.href=url;
self.close();
}
</script>
</head>
<body>
<!-- BEGIN Grid eventGrid -->
<table class="Header" cellspacing="0" cellpadding="0" border="0">
<tr>
<td class="HeaderLeft"><img src="Styles/{CCS_Style}/Images/Spacer.gif" border="0"></td>
<th>{event_title}</th>
<td class="HeaderRight"><img src="Styles/{CCS_Style}/Images/Spacer.gif" border="0"></td>
</tr>
</table>
<table class="Grid" cellspacing="0" cellpadding="0">
<!-- BEGIN Row -->
<tr class="Row">
<td><b>{event_date}
<!-- BEGIN Label event_time -->, {event_time}<!-- END Label event_time -->
<!-- BEGIN Label event_time_end -->- {event_time_end} <!-- END Label event_time_end --></b><br>
<!-- BEGIN Label category_id --><b>{res:cal_category}:</b> {category_id}. <br>
<!-- END Label category_id --><b>{res:cal_addedby}:</b> {user_id}<br>
<br>
{event_desc}
<!-- BEGIN Panel PanelLocation --><br>
<br>
<b>{LabelLocation}:</b> {event_Location}<!-- END Panel PanelLocation -->
<!-- BEGIN Panel PanelCost --><br>
<br>
<b>{LabelCost}:</b> {event_Cost}<!-- END Panel PanelCost -->
<!-- BEGIN Panel PanelURL --><br>
<br>
<b>{LabelURL}:</b> <a href="{event_URL_Src}">{event_URL}</a><!-- END Panel PanelURL -->
<!-- BEGIN Panel PanelTextBox1 --><br>
<br>
<b>{LabelTextBox1}:</b> {event_TextBox1}<!-- END Panel PanelTextBox1 -->
<!-- BEGIN Panel PanelTextBox2 --><br>
<br>
<b>{LabelTextBox2}:</b> {event_TextBox2}<!-- END Panel PanelTextBox2 -->
<!-- BEGIN Panel PanelTextBox3 --><br>
<br>
<b>{LabelTextBox3}:</b> {event_TextBox3}<!-- END Panel PanelTextBox3 -->
<!-- BEGIN Panel PanelTextArea1 --><br>
<br>
<b>{LabelTextArea1}</b> {event_TextArea1}<!-- END Panel PanelTextArea1 -->
<!-- BEGIN Panel PanelTextArea2 --><br>
<br>
<b>{LabelTextArea2}:</b> {event_TextArea2}<!-- END Panel PanelTextArea2 -->
<!-- BEGIN Panel PanelTextArea3 --><br>
<br>
<b>{LabelTextArea3}:</b> {event_TextArea3}<!-- END Panel PanelTextArea3 -->
<!-- BEGIN Panel PanelCheckBox1 --><br>
<br>
<b>{LabelCheckBox1}:</b> {event_CheckBox1}<!-- END Panel PanelCheckBox1 -->
<!-- BEGIN Panel PanelCheckBox2 --><br>
<br>
<b>{LabelCheckBox2}:</b> {event_CheckBox2}<!-- END Panel PanelCheckBox2 -->
<!-- BEGIN Panel PanelCheckBox3 --><br>
<br>
<b>{LabelCheckBox3}:</b> {event_CheckBox3}<!-- END Panel PanelCheckBox3 --></td>
</tr>
<!-- END Row -->
<!-- BEGIN Panel edit -->
<tr class="Row">
<td align="right">
<div class="noprint"><a href="javascript:parent_redirect('{edit_event_Src}')">{res:cal_edit_event}</a></div>
</td>
</tr>
<!-- END Panel edit -->
<!-- BEGIN NoRecords -->
<tr class="NoRecords">
<td>{res:CCS_NoRecords}</td>
</tr>
<!-- END NoRecords -->
</table>
<!-- END Grid eventGrid -->
<br>
<div class="noprint" align="left"><a href="{close_link_Src}">{res:close_window}</a> <a href="{print_link_Src}">{res:print}</a></div>
</body>
</html>
It seems like pretty simple code, but I just don't know enough about ASP and CSS to figure out how these two are talking to each other.... 
Basically, I just need the html to display a link in the form:
Code:
<a href="Event_{event_id}.ics">Click here to download the event into your Outlook calendar.</a>
Bookmarks