View Full Version : Help with a web server control and design

12-20-2006, 04:03 AM
Hello all:

I would appreciate some feedback.

I have this simple server control, which is primarly used as a a footer for all the pages on our site, however, we would like to use it with our classic asp pages. We have had it working since day one, but now, we just noticed that the year is not dynamic (on div tag):

<script language="vbscript" runat="server" type="text/javascript">

Protected Sub CurrentYear_Load(ByVal sender As Object, ByVal e As System.EventArgs)

CurrentYear.InnerText = "© Pacific West Association of REALTORS® 2005 - " & Date.Now.Year & ". All Rights Reserved"

End Sub


<style type="text/css">


.footer:Link{font-size: 10px; color:#FFFFFF; text-decoration:none}

.footer:Visited{text-decoration:none; font-size: 10px; color:#FFFFFF}

.footer:Hover{text-decoration:underline; color:#FFFFFF}

.footer:Active{text-decoration:none; color:#FFFFFF}



<table width="780" border="0" cellpadding="2" cellspacing="0" bgcolor="#5C6F8D">

<tr align="center">


<a class="footer" href="#" onclick="window.open('/homepage/LicenseAgreement.aspx','_blank','menubar=no,location=no,toolbar=no,status=no,scrollbars=yes,resizabl e=yes,width=800,height=560,top=10,left=10'); return false">End User License Agreement</a>

<img src="/template/footerimages/dots.jpg" width="7" height="9" hspace="15" alt="">

<a class="footer" href="#" onclick="window.open('/homepage/PrivacyNotice.aspx','_blank','menubar=no,location=no,toolbar=no,status=no,scrollbars=yes,resizable=y es,width=790,height=560,top=10,left=10'); return false">PWR Privacy Notice</a>





<td width="756" height="30" align="center">


<div class="copyright" id="CurrentYear" runat="server" onload="CurrentYear_Load"></div>





The problem now is that when we open an asp page, we receive this error 500: So, I take it we can't mix VB language within the classic asp, because it can't parse that language out on the server?

Microsoft VBScript compilation error '800a03ea'

Syntax error

/template/genericfooter.ascx, line 2

Protected Sub CurrentYear_Load(ByVal sender As Object, ByVal e As System.EventArgs)
The reason for this is to avoid having to footer pages, which would complicate things.


12-20-2006, 04:57 PM
Never mind, this is becoming a tedious task, so for now, I am implenmenting an include file that outputs in class asp. Oh well.