I am very new to C #, so my question may be silly, but I cannot solve it myself and googling. I need to check if the year is a jump, so:
<mso:if runat=server condition='<%# DateTime.IsLeapYear(2000)%>'>
works great. But I need to get a year from something, for example. MS SQL:
YEAR(getDate()) AS yarr
...
<mso:if runat=server condition='<%# DateTime.IsLeapYear(<%#Convert.ToInt32(DataBinder.Eval(Container.DataItem, "yarr"))%>)%>'>
Error:
CS1040: Preprocessor directives should appear as the first non-blank character in a string
But why? Do not look at the space before the year.
source share