Display today's date in aspx tableheadercell
Display today's date in aspx tableheadercell
Display today's date in aspx tableheadercell
Display today's date in aspx tableheadercell
Display today's date in aspx tableheadercell
Display today's date in aspx tableheadercell Display today's date in aspx tableheadercell Display today's date in aspx tableheadercell Display today's date in aspx tableheadercell Display today's date in aspx tableheadercell Display today's date in aspx tableheadercell Display today's date in aspx tableheadercell Display today's date in aspx tableheadercell
Display today's date in aspx tableheadercell Display today's date in aspx tableheadercell
Display today's date in aspx tableheadercell
Go Back  Xtreme Visual Basic Talk > > > Display today's date in aspx tableheadercell


Reply
 
Thread Tools Display Modes
  #1  
Old 11-21-2013, 10:57 AM
lroyce's Avatar
lroyce lroyce is offline
Regular
 
Join Date: Feb 2002
Posts: 57
Question Display today's date in aspx tableheadercell


I know there is a way to do this but it escapes me

I have a web form with an asp:table in it. The header cell displays "Visitor Log" and I would like to enter code to make it say "Visitor Log - (today's date)"

How do I do that?

Thanks in advance
__________________
"I don't want the world - I just want your half."
They Might Be Giants
Lorena
Reply With Quote
  #2  
Old 04-04-2014, 05:25 AM
JustinCase2 JustinCase2 is offline
Junior Contributor
 
Join Date: Apr 2006
Posts: 324
Default Well

If you can do this in codebehind, it is as simple as

Code:
Header.Text="Visitor Log " & DateTime.Now.ToString("dd.MM.yyyy")
You can set any date format you wish in Place of "dd.MM.yyyy".

If you need to do it in the html code, you can do something like:

Code:
HeaderText="Visitor Log <%# DateTime.Now.ToString('dd.MM.yyyy') %>"
I am not 100% sure of the syntax of that last part, but you should be able to figure it out from there.
Reply With Quote
  #3  
Old 04-08-2014, 07:24 AM
lroyce's Avatar
lroyce lroyce is offline
Regular
 
Join Date: Feb 2002
Posts: 57
Default Thanks!

Works great!
__________________
"I don't want the world - I just want your half."
They Might Be Giants
Lorena
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
Display today's date in aspx tableheadercell
Display today's date in aspx tableheadercell
Display today's date in aspx tableheadercell Display today's date in aspx tableheadercell
Display today's date in aspx tableheadercell
Display today's date in aspx tableheadercell
Display today's date in aspx tableheadercell Display today's date in aspx tableheadercell Display today's date in aspx tableheadercell Display today's date in aspx tableheadercell Display today's date in aspx tableheadercell Display today's date in aspx tableheadercell Display today's date in aspx tableheadercell
Display today's date in aspx tableheadercell
Display today's date in aspx tableheadercell
 
Display today's date in aspx tableheadercell
Display today's date in aspx tableheadercell
 
-->