title: Script works on Create, but in Edit doens't
body: <p>guys.</p>
  
  <p>I have a View on my ASP.NET MVC Project.
  This View has a lot of fields and a script to search some data.</p>
  
  <pre><code>&lt;link href="@Url.Content("~/Content/styles/people.css")" rel="stylesheet" type="text/css" /&gt;
  &lt;script src="@Url.Content("~/Scripts/people.js")" type="text/javascript"&gt;&lt;/script&gt;
  
  
  &lt;input type="hidden" id="selectiveAccess" name="selectiveAccess" value="@ViewBag.SelectiveAccess" /&gt;
  &lt;input type="hidden" id="peopleID" name="peopleID" value="@ViewBag.PeopleID" /&gt;
  
  &lt;div id="content"&gt;
  &lt;h1&gt;People - Create&lt;/h1&gt;
  &lt;h3&gt;All the fields with (*) are required.&lt;/h3&gt;
  
  
  @using (Html.BeginForm("Save", "People", FormMethod.Post))
  {
      @Html.Partial("EnabledCourses")
      @Html.Partial("GeneralData")    
      @Html.Partial("AddressData")
      @Html.Partial("ContactData")    
      @Html.Partial("OtherInformations")
      @Html.Partial("Research")
  
      &lt;a href="#top"&gt;Back to the top&lt;/a&gt;
      &lt;div id="divErrors"&gt;&lt;/div&gt;
  
      &lt;div id="actions"&gt;
          &lt;ul style="list-style: none;"&gt;
              &lt;li style="display: inline"&gt;&lt;input type="reset" id="clear" style="height: 3em; width: 10em" value="Clear form" /&gt;&lt;/li&gt;
              &lt;li style="display: inline"&gt;&lt;input type="submit" id="continue" style="height: 3em; width: 10em" value="Continue" /&gt;&lt;/li&gt;
          &lt;/ul&gt;
      &lt;/div&gt;
  }
  </code></pre>
  
  <p></p>
  
  <p>When I call Index(), the script works fine.</p>
  
  <pre><code>public ActionResult Index()
  {
      ViewBag.PeopleID = string.Empty;
      return View();
  }
  </code></pre>
  
  <p>When I call Edit(), the same script doensn't works.</p>
  
  <pre><code>public ActionResult Edit(long peopleID)
  {
      ViewBag.PeopleID = peopleID;
      return View("Index");
  }
  </code></pre>
  
  <p>This is the script:</p>
  
  <pre><code>function searchCityByPostalCode() {
  
  var postalCode = {
      'postalCode': $('#postalCode').val()
  };
  
  $.get(
      'people/SearchCityByPostalCode',
      postalCode,
      function (city) {
          // do something that works.
      }
  );
  }
  </code></pre>
  
  <p>Anyone knows the problem?
  Thanks!!!</p>