CodeVerge.Net Beta


   Explore    Item Entry   Register  Login  
Microsoft News
Asp.Net Forums
IBM Software
Borland Forums
Adobe Forums
Novell Forums

MS SQL 2008 on ASP.NET Hosting



Zone: > NEWSGROUP > Asp.Net Forum > general_asp.net.master_pages_themes_and_navigation_controls Tags:
Item Type: NewsGroup Date Entered: 4/4/2007 8:51:39 PM Date Modified: Subscribers: 0 Subscribe Alert
Rate It:
(NR, 0)
XPoints: N/A Replies: 2 Views: 41 Favorited: 0 Favorite
Can Reply:  No Members Can Edit: No Online: Yes
3 Items, 1 Pages 1 |< << Go >> >|
David_Gonzales
Asp.Net User
dynamic "page last updated" date4/4/2007 8:51:39 PM

0/0

Hello.

 I am new to asp.net  and am creating a Masterpage-based site. 

I was wondering if there is a way to dynamically display a "page last updated" date at the bottom of my content pages.

 Any help or insight you can provide will be most appreciated.

 Thank you!

himawari
Asp.Net User
Re: dynamic &quot;page last updated&quot; date4/5/2007 2:53:58 AM

0/0

Hi David,

In your MasterPage's Page_Load method, add the following code:

    protected void Page_Load(object sender, EventArgs e)
    {
			Page.ClientScript.RegisterClientScriptInclude("default", Page.ResolveUrl("~/js/default.js"));
			string filename = Context.Request.PhysicalPath;
			if (File.Exists(filename)) {
				lblTest.Text = File.GetLastWriteTimeUtc(filename).ToLocalTime().ToLongDateString();

			}
    }

The Code is in C# and  and you will need to import the System.IO namespace. You might want to change the formatting of the date to your liking. The GetLastWriteTimeUtc method returns a DateTime object and you may apply formatting to it.

For more information, please look at

http://msdn2.microsoft.com/en-us/library/system.globalization.datetimeformatinfo(vs.71).aspx

 I hope this helps.


Eric on Web Development
himawari
Asp.Net User
Re: dynamic "page last updated" date4/5/2007 2:56:55 AM

0/0

Well, please ignore the RegisterClientScript part. The line is for registering my site-wide javascript and you probably won't need / have it . Sad
Eric on Web Development
3 Items, 1 Pages 1 |< << Go >> >|


Free Download:

Books:
OpenVMS with Apache, OSU and WASD: The Nonstop Webserver Authors: Alan Winston, Pages: 454, Published: 2002
Special Edition Using Microsoft Office FrontPage 2003: Special Edition Authors: Jim Cheshire, Paul Colligan, Pages: 1080, Published: 2003
Macromedia Dreamweaver 8: Training from the Source Authors: Khristine Annwn Page, Pages: 590, Published: 2006
Microsoft Office FrontPage 2003: The Complete Reference Authors: Martin S. Matthews, Erik B. Poulsen, Pages: 800, Published: 2003
Master Visually Creating Web Pages: Creating Web Pages Authors: Joe Kraynak, Pages: 421, Published: 2004
Computer Performance Evaluation: Modelling Techniques and Tools : 12th International Conference, TOOLS 2002, London, UK, April 14-17, 2002 : Proceedings Authors: Tony Field, Anthony J. Field, Peter G. Harrison, Jeremy Bradley, Uli Harder, Pages: 348, Published: 2002
Web Design in a Nutshell: A Desktop Quick Reference Authors: Jennifer Niederst, Jennifer Niederst Robbins, Pages: 618, Published: 2001
Dreamweaver MX 2004: The Missing Manual Authors: David Sawyer McFarland, David Pogue, Pages: 836, Published: 2004
Macromedia Dreamweaver MX 2004: Training from the Source Authors: Khristine Annwn Page, Pages: 579, Published: 2003
Special Edition Using Adobe GoLive 6: Special Edition Authors: Brian Dunning, Allyson Knox, Lori Becker, Pages: 672, Published: 2002

Web:
Dynamic Root Disk: Downloads and Patches To get your free download, go to the DRD Software Depot download page: ... Determine the "last updated" date listed in the file and make a note of it. ...
Save bandwidth costs: Dynamic pages can support If-Modified-Since too A category page’s last-modified date is determined by the category’s most ... thus it should have an attribute last updated that’s changeable in the UI and ...
Re: Dynamic Page Listing (DPL) vs. SemanticMedia W: msg#00012 Re: Dynamic Page Listing (DPL) vs. SemanticMedia Wiki: msg#00012 ... (e.g. sorting by data creation date, last update date and other article metadata, ...
Re: spidering dynamic php pages How does orcasearch determine if a page was updated or not, and where does it get the updated date from? Is there some way to get it to use this last ...
DynamicPageList - Meta The value can be categoryadd (default, sort by date pages were categorised) or lastedit (sort by date pages were last edited). ...
Peachpit: Add Dynamic Time and Date Stamps in GoLive 6 > Using the ... The Last Modified (ID) action gets around this by utilizing client-side JavaScript to update the date regardless of the tool being used to author the page. ...
ITS - Web Publishing at USC - Resources and Documentation ... Or, information about the document, such as the last time it was updated, ... can be included on a page, or real-time information, such as the system date, ...
Ajax dynamic page content from PHP backend. Date Added: Feb 28, 2007. Last Updated: Feb 28, 2007 ... You can be the FIRST one to write a review for Ajax dynamic page content from PHP backend. ...
Last modified header date for dynamic pages Because our dynamic content changes each time a page is served [ even the same one ], we show the last modified date updated on every visit. ...
Protocols and Formats Working Group Public Page Dynamic Web Content Accessibility Work effort .... File (not content) last updated on $Date: 2006/03/23 07:20:34 $ by $Author shawn $

Videos:
NBA Live 09 presents Live 365 PS3,Xbox 360 Release Date: October 2008 DYNAMIC DNA -- The brain behind the game is powered by Synergy Sports Technology , the premier analytics prov...
NBA Live 09 vs NBA 2K9 SORRY FOR THE BAD QUALITY 2K9 ALL THE WAY PS3 VERSION NBA LIVE 09: Dynamic DNA The brain behind the game is powered by the premier analytics provider...
Charlie Rose - Fouad Siniora / Alan Furst Segment 1: Fouad Siniora, the Prime Minister of Lebanon talks about the crisis in the Middle East. Segment 2: Author Alan Furst, dicusses his new bo...
Charlie Rose - Brian Ross / Syria's role in the Mid-East / YouTube co-founders Segment 1: The latest on the disrupted terrorist plot in London with Brian Ross of ABC News. Segment 2: A discussion about the role of Syria in th...
Connexions - Building Communities and Sharing Knowledge Google TechTalks April 11, 2006 Richard G. Baraniuk Richard G. Baraniuk is the Victor E. Cameron Professor of Electrical and Computer Engineering a...
How To Break Web Software - A look at security vulnerabilities in web software Google TechTalks April 13, 2006 Mike Andrews Mike Andrews is a senior consultant who specializes in software security and leads the web application...
Hour of the Furnaces - 2 of 3 A classic protest film by Fernando Solanas. Part 2 of 3. SUBTERRANEAN CINEMA http://subcin.com THE SUBTERRANEAN COLLECTION http://subcin.com/sub...
Charlie Rose - Brian Ross / Major General Douglas Lute / John McLaughlin AN UPDATE ON THE WAR ON TERRORISM Segment 1: Brian Ross of ABC News discusses the latest news regarding al Qaeda and the US efforts to combat terror...
Long Beach City Council Meeting Long Beach City Council Meeting
Charlie Rose - Discussions about the disrupted terror plot in London Segment 1: U.S. Attorney General Alberto Gonzales Segment 2: Mark Urban, BBC News Segment 3: Steven Simon of the Council on Foreign Relations and R...




Search This Site:










accessing data from tree view control

problem with defaultbutton for panel

menu

treeview control in asp.net 2.0

asp.net menu control

themes not working on subclassed page.

referencing controls from master page.

"master pages" for user controls

menu control - changing default behaviour

problems with stylesheets in master pages...

themes and masterpages

how to refer to a content page from the master page

using dynamicitemformatstring to add custom icons to the system.web.ui.webcontrols.menu - possible?

changing menu item styles programatically?? menu 2.0

two problems: menu dummy url command & goto command

right to left treeview control, is that possible ?! or not ?!

custom layout for asp.net 2.0 menu

how to use java script confirmation messagebox in the content page ?

master page, content page -> outputcache doesn't seem to work

site map

dynamic menu

how i can handle onmouseover event in treeview control.

obscure (?) question on menu control

how to set background image in menuitem?

how to access properties of the parant panel in the contentplaceholder?

master/child page postback event

master pages, themes or user controls

custom site map provider & resource key

menu web control

navigation using personalization

  Privacy | Contact Us
All Times Are GMT