Priyanka Singh

Priyanka Singh

  • 692
  • 1.4k
  • 675.5k

How to excess value in .Aspx page in ASP.Net

Feb 6 2020 5:06 AM
I have code in .cs page
  1. var startDate = new DateTime(now.Year, now.Month, 1);  
  2. ar endDate = startDate.AddMonths(1).AddDays(-1); 
 How to excess these two values in .aspx page.As I am using
 
  1. <%=startDate %> 
 But it gives an error that name does not exist in the current context. What to do??

Answers (5)