Format("xxx", "yyy") works in VB.Net because the Microsoft.VisualBasic
Runtime is referenced. You could also referece this from your C# project
which would then let you use the same Microsoft.VisualBasic.Strings.Format()
method (which is exactly what you are doing with Format() in VB.Net).
A better alternative in my mind (since it'll work in both C# and VB.Net with
no additional work) is to simply use
calender.selectedData.ToString("dd/yyyy")
Karl
--
MY ASP.Net tutorials
http://www.openmymind.net/
"Mike" <Mi**@discussions.microsoft.com> wrote in message
news:EB**********************************@microsof t.com...
I allow the use select a date from a calender control and I want to format
the date.
I have this:
Session["date"] = Format("calender.selectedDate, "dd/yyyy");
and i'm getting an error on Format when i compile:
the error is:
The Name Format does not exist in class or namespace.
what do i need to do different in C# to do this then VB.NET