title: Using Server Side Constants in ASP.NET MVC 3
body: <p>I have a web page that calls back to my web service. Occasionally, a 404 may occur. I am trying to detect that using the structure:</p>
  
  <pre><code>$.ajax({
    url: "/myService/myAction",
    contentType: "application/json",
    success: action_Succeeded,
    error: action_Failed
  });
  
  function action_Succeeded() {
    // Do stuff
  }
  
  var v = 0;
  function action_Failed(p1, p2, p3) {
    if (p1.status != 200) {
      if (ServerSideObject.COUNT == v) {
        // Do Stuff
      }
    }
  }
  </code></pre>
  
  <p>I have a class on the server with a publicly visible int called COUNT; How do I plug that value in where "ServerSideObject.Property" exists? I thought I could use <code>@ServerSideObject.Property</code> but that doesn't seem to work. How do I plug this value in? For reference, ServerSideObject looks like the following:</p>
  
  <pre><code>public class ServerSideObject 
  {
    public const int COUNT = 3;
  }
  </code></pre>
  
  <p>Thank you for your help!</p>