Welcome Guest Search | Active Topics | Sign In | Register

Editable Calendar again - what's {0} in DayRender event? Options
Danny Chok
Posted: Thursday, August 23, 2007 9:22:04 PM
Rank: Member
Groups: Member

Joined: 8/16/2007
Posts: 10
from the sample code:

Dim dayId As String = "dayId_" + EO.Web.Calendar.DateToString(e.Day.Date)
dayId = dayId.Replace("-"c, "_"c)
html = "<table id=""{0}"" ................



it generates:

<table id="dayId_2007_08_01"



It works fine, but just I have no clue how it generates the date output. What's {0} actually? A variable of some kind?



Thanks

Danny
eo_support
Posted: Thursday, August 23, 2007 9:30:27 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,096
Hi Danny,

If you look a few lines further you will see the sample code calls String.Format:

html = String.Format(html, dayId, backgroundColor)

Thanks
Danny Chok
Posted: Friday, August 24, 2007 8:40:34 PM
Rank: Member
Groups: Member

Joined: 8/16/2007
Posts: 10
Thanks. Found an 101 tutorial for String.Format

http://blogs.msdn.com/kathykam/archive/2006/03/29/564426.aspx

{0} {1} are placeholders for string replacement

Danny


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.