views:

16

answers:

1

I want to put a variable in a aspx so when publishing it transform to actual date...

I mean I want to change

Actual date: 23/12/10

for

Actual date: $date

and when it compiles it gets rendered

A: 

You can simply use:

Actual date: <%=Date.Now.ToString("dd/MM/yy")%>

See this handy list of DateTime.ToString formats.

Oded
excuse me , i dont explain it well, i dont want to do it in aspx, but in visual studio publishing, i mean: only when i click on publish site, like a msbuild action post publication...