title: error CS1513: } expected in asp.net mvc 4
body: <p>I have a view which is very simple. It contains some C# code.</p>
  
  <pre><code>@{
     ViewBag.Title = "Community";
     Layout = "~/Views/Shared/_Layout.cshtml";
   }
  
  &lt;div id="req1"&gt;
    &lt;form&gt;
       &lt;input id="txt1" type="text" name="txt1" /&gt;
   &lt;/form&gt;
  &lt;/div&gt;
  &lt;div id="btn1"&gt;Send&lt;/div&gt;
  &lt;div id="res1"&gt;&lt;/div&gt;
  @{
      public string GetPassage(string strSearch)
      {
         using (var c = new System.Net.WebClient())
         {
             string url = "http://www.esvapi.org/v2/rest/passageQuery?key=IP&amp;passage=' + strSearch + '&amp;options=include-passage-references=true";
             return c.DownloadString(Server.UrlDecode(url));               
         }
      }
   }
  </code></pre>
  
  <p>I don't know what is wrong. The error message is:</p>
  
  <pre><code>Source Error:
  
  Line 117:EndContext("~/Views/Home/Community.cshtml", 236, 9, true);
  </code></pre>
  
  <p><strong>Update:</strong></p>
  
  <p>If I moved the code to controller.</p>
  
  <pre><code>public ActionResult Community()
  {
      ViewBag.Message = "";
  
      return View();
  }
  
  public string GetPassage(string strSearch)
  {
      using (var c = new System.Net.WebClient())
      {
          string url = "http://www.esvapi.org/v2/rest/passageQuery?key=IP&amp;passage=" + strSearch + "&amp;options=include-passage-references=true";
          return c.DownloadString(Server.UrlDecode(url));
      }
  }
  </code></pre>
  
  <p>And I want to make a ajax call based on <a href="http://blog.bobcravens.com/2009/11/ajax-calls-to-asp-net-mvc-action-methods-using-jquery/" rel="nofollow">the example</a>. How is the code in javascript?</p>