Iron Speed Technical Forums
Register Latest Topics
 
 
 


Reply
  Author   Comment  
TheChief

Avatar / Picture

MVP Developer
Registered:
Posts: 145
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();
                                    CopyDate=today.getFullYear();
 
                                </SCRIPT>
 
 
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

jadach

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

 


__________________
Jerry
pk_davidson

Registered:
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):
Code:
' 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

__________________
Paul
JimiJ

Avatar / Picture

MVP Developer
Registered:
Posts: 1,947
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='http://www.jimitron.net' title='JimiTron Software'>JimiTron Software.</a> All rights reserved.";


[image]


Cheers,
Jimi J

__________________

  Jaime Jegonia
[jts_logo]

Iron Speed MVP Developer
 

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

Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Download Iron Speed Designer

Terms of Service Privacy Statement