hi
what do I wrong in Sharepoint 2013 ???
In sharepoint 2010 I did this here and it work fine
<SafeMode MaxControls="2000" CallStack="false" DirectFileDependencies="10" TotalFileDependencies="250" AllowPageLevelTrace="false">
<PageParserPaths>
<PageParserPath VirtualPath="/SitePages/Mass.aspx" CompilationMode="Always" AllowServerSideScript="true" />
</PageParserPaths>
</SafeMode>
My C# code is also the same:
<script language="c#" runat="server">
public void Page_Load(object sender, EventArgs e)
{
DateTime startdate = new DateTime(2013, 2 , 14, 11, 00, 0);
DateTime todaydate = DateTime.Now.Date;
// DateTime todaydate = DateTime.Now.Date + startdate.TimeOfDay;//
TimeSpan t = todaydate - startdate;
int days = (int)t.TotalDays;
int dayshalf = ((int)t.TotalDays - 1);
if ((days % 21 <= 6) && (days % 21 > -1))
.......................................................
.......................................
</script>
in 2010 the url is
http://jap-server5/SitePages/Mass.aspx
in the 2013 it is also
http://jap-server5/SitePages/Mass.aspx
but in sharepoint 2013 I get this error
An error occurred during the processing of /SitePages/Mass.aspx. Code blocks are not allowed in this file.