title: Javascript serialization of DateTime in asp.net is not giving a javascript date object?
body: <p>When I parse a DateTime to json in .Net it returns a string (i.e. <code>"\/Date(1249335194272)\/"</code>). How do I make it return a js Date object constructor not wrap in a string?</p>
  
  <pre><code>// js server code
  var dteNow = &lt;%= jsonDateNow %&gt;;
  
  
  // js rendered code
  var dteNow = "\/Date(1249335477787)\/";
  
  
  // C#
  using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Web.UI;
  using System.Web.Script.Serialization;
  using System.Web.UI.WebControls;
  
  namespace testing{
      public partial class iTaxPrep : System.Web.UI.Page
      {
          protected string jsonDateNow;
          protected void Page_Load(object sender, EventArgs e)
          {
              if (!IsPostBack)
              {
                  jsonDateNow = new JavaScriptSerializer().Serialize(DateTime.Now);
  
              }
          }
      }
  }
  </code></pre>