Iron Speed Technical Forums
Sign up Latest Topics

  Author   Comment  

Avatar / Picture

MVP Developer
Posts: 147
Reply with quote  #1 
Have ever had to update your IronSpeed applications and wondered what version it was built in?
Have you had to go back and change the Copyright every new year?
Well here is an easy way to do both of these tasks.  Please note I am currently working on a class that will pull out the version automatically as well, but haven't finished that yet.  If someone already has it maybe they will post?.

This example makes the Copyright dynamic, and the version is hardcoded.  Enjoy.

1. Go to the Header and Footer Folder
2. Go to Footer.ascx
3. Right click on Copyright
4. Choose Page Directives
5. In the "Page Prologue"
    Place this code
                <!-- Set Copyright Date dynamically -->
                                <SCRIPT LANGUAGE="JavaScript">
                                    today=new Date();
6.  Place this code in the "Page Epilogue"
     Note: you will need to change the Company Name and the version of IronSpeed.
                Copyright © 1997-<SCRIPT LANGUAGE="JavaScript">document.write(CopyDate);</SCRIPT> &nbsp; Providence Health & Services <br>IronSpeed version 9.2.1

7.  Under the "Appearance"  Text:  Take out the copyright text.

8.  Run application and enjoy.


Former Senior Web Engineer
CEO Simple And Smart Apps
IronSpeed MVP


Posts: 205
Reply with quote  #2 
Copyright &copy; <%=DateTime.Now.Year%>
works well too.



Posts: 223
Reply with quote  #3 
Good stuff Wayne.
I'm doing my dynamic year in the code behind.
I'll have to implement your XML parser when I have the time so I can stop forgetting to update the ISD version when I update.

I also like to add a string on my Copyright line, TheServerNames, so I can show the name of the servers in use (prevents me from screwing with live data when I think I'm testing.)  This of course exposes your server names which for a public app you probably do not want.  So I set this string to only be visible to admin permissions.

I put this in LoadData after LoadData_Base()  (in VB.NET):
' make the copyright dynamic so we don't have to modify it in anymore 
Me.Copyright .Text = "Copyright @ 2009-" + Now.Year.ToString + " Some Company."

'Add IIS server name to Copyright/Version info line in Footer
Me.TheServerNames.Text = " Running under IIS Server: " & Me.Server.MachineName.ToString.ToUpper()

' get info from web.config to callout the SQL server connection name.
' Look for the name in the connectionStrings section.
Dim csTemp As ConnectionStringSettings = ConfigurationManager.ConnectionStrings("DatabaseYOURNAME")
If Not csTemp Is Nothing Then
   Dim cnStr As System.Data.SqlClient.SqlConnectionStringBuilder = New System.Data.SqlClient.SqlConnectionStringBuilder(csTemp.ConnectionString())
    Me.TheServerNames.Text += " w/ SQL Server: " & cnStr.DataSource.ToString.ToUpper()
End If


Avatar / Picture

MVP Developer
Posts: 1,970
Reply with quote  #4 
You may need to include URL as well with this single line code at Footer Page_PreRender:

Copyright.Text = "Copyright ©  2012~"+DateTime.Now.Year + " <a href='' title='JimiTron Software'>JimiTron Software.</a> All rights reserved.";


Jimi J


  Jaime Jegonia

Iron Speed MVP Developer

". . . and whoever sows generously will also reap generously" 2 Cor 9:6

Previous Topic | Next Topic

Quick Navigation:

Easily create a Forum Website with Website Toolbox.

Download Iron Speed Designer

Terms of Service Privacy Statement