1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Need help with web server control and design

Discussion in 'C#' started by binici, Dec 19, 2006.

  1. #1
    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

    </script>

    <style type="text/css">

    <!--

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

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

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

    -->

    </style>

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

    <tr align="center">

    <td>

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

    &nbsp;&nbsp;&nbsp;&nbsp;

    </td>

    </tr>

    <tr>

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

    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

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

    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

    </td>

    </tr>

    </table>

    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.

    Thanks!
     
    binici, Dec 19, 2006 IP
    SEMrush
  2. binici

    binici Peon

    Messages:
    22
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Never mind, this is becoming a tedious task, so for now, I am implenmenting an include file that outputs in class asp. Oh well.
     
    binici, Dec 20, 2006 IP