title: how to set dynamic controller name in the partial page
body: <p>I have a partial page it is using two View page different controller but there  have same <code>Edit</code> Action  method. i need to set controller name dynamically  for particular page in the  run time . how can i do it ?</p>
  
  <p>My partial  page <code>_SearchProduct</code> in the shared folder it is working only for <code>WomanController</code> action method <code>Edit</code>:</p>
  
  <pre><code>&lt;div class="row"&gt;
      &lt;div class="col-md-6"&gt;
          @using (Html.BeginForm("Edit", "Woman", FormMethod.Get))
          {
              &lt;p&gt;
                  Find by Product Id : @Html.TextBox("SearchString", ViewBag.CurrentFilter as string)
                  &lt;input type="submit" value="Search" /&gt;
              &lt;/p&gt;
          }
      &lt;/div&gt;
      &lt;div class="col-md-6"&gt;
  
  
          &lt;span style="color:green"&gt;@ViewBag.ProductName &lt;/span&gt;
      &lt;/div&gt;
      &lt;span style="color:red"&gt; @ViewBag.FindResult &lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>My <code>WomanController</code> EDIT page :</p>
  
  <pre><code>   @model MKL.Models.WomanProduct
  
  &lt;hr /&gt;
  @Html.Partial("~/Views/Shared/_SearchProduct.cshtml")
  &lt;hr /&gt;
  @using (Html.BeginForm())
  {
      @Html.AntiForgeryToken()
  
      &lt;div class="form-horizontal"&gt;
  
          @Html.ValidationSummary(true)
          @Html.HiddenFor(model =&gt; model.WomanProductId)
  
          @if (ViewBag.ProductId != null)
          {
  
              @Html.Hidden("ProductId", (int)ViewBag.ProductId)
          }
  
          &lt;div class="form-group"&gt;
              &lt;div class="col-md-offset-2 col-md-10"&gt;
                  &lt;input type="submit" value="Save" class="btn btn-default" /&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
  
      &lt;/div&gt;
  }
  </code></pre>
  
  <p>My <code>ManController</code> EDIT page :</p>
  
  <pre><code>      @model MKL.Models.ManProduct
  
  &lt;hr /&gt;
  @Html.Partial("~/Views/Shared/_SearchProduct.cshtml")
  &lt;hr /&gt;
  @using (Html.BeginForm())
  {
      @Html.AntiForgeryToken()
  
      &lt;div class="form-horizontal"&gt;
  
          @Html.ValidationSummary(true)
          @Html.HiddenFor(model =&gt; model.ManProductProductId)
  
          @if (ViewBag.ProductId != null)
          {
  
              @Html.Hidden("ProductId", (int)ViewBag.ProductId)
          }
  
          &lt;div class="form-group"&gt;
              &lt;div class="col-md-offset-2 col-md-10"&gt;
                  &lt;input type="submit" value="Save" class="btn btn-default" /&gt;
              &lt;/div&gt;
          &lt;/div&gt;
  
  
      &lt;/div&gt;
  }
  </code></pre>
  
  <p>SO need to dynamically set Partial view Controller name <code>Man</code> and <code>Woman</code></p>
  
  <pre><code> @using (Html.BeginForm("Edit", "", FormMethod.Get)){}
  </code></pre>