title: Partial Views, redirected to another URL?
body: <p>Am trying to build a project using MVC 4 and Razor. Am having trouble understand partial views. I have a list of my domain objects that I iterate through and display it in a list box (each row being clickable). I split this into main view and a partial view which renders the domain object which works fine. Inside my partial view I want to make each item clickable and upon click, I want to create a new partial view displaying details about the domain object.</p>
  
  <p>Here is what I have</p>
  
  <p>My main view looks like this</p>
  
  <pre><code>&lt;div class="panely"&gt;
      &lt;div class="list-group"&gt;
           @{ Html.RenderPartial("DomainObjectsPartial");}
        &lt;/div&gt;
   &lt;/div&gt;
  </code></pre>
  
  <p>My partial view looks like this</p>
  
  <pre><code>&lt;div class="list"&gt;
    @foreach (var x in @Model)
    {
       &lt;a href="@Html.Partial("DomainObjectPartial")" class="list-item"&gt;
         &lt;em&gt;@x.Name&lt;/em&gt;
       &lt;/a&gt;
     }
  &lt;/div&gt;
  </code></pre>
  
  <p>I have a view named DomainObjectPartial, which has nothing but a small div with hello.
  When the user clicks on a domain object, I expect the partial view to be rendered within the main view, but instead I get a error saying</p>
  
  <blockquote>
    <p>A potentially dangerous Request.Path value was detected from the
    client (&lt;).</p>
  </blockquote>
  
  <p>And when I look at my URL, the contents of the partial view are contained within it like</p>
  
  <pre><code>http://localhost/&lt;div&gt;hello&lt;/div&gt;
  </code></pre>
  
  <p>I dont want to be redirected to another URL. I just want the partial view to be displayed below the list. Can anyone explain to me what am i missing or not understanding?</p>