5
Answers

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

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)