Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>I would suggest you to use normal form that will be AJAXified later:</p> <pre><code>@using (Html.BeginForm("Index", "Problem") { &lt;div class="notice"&gt; &lt;div class="prepend-1 span-2"&gt; &lt;label for="targetPriorityID"&gt;Priority&lt;/label&gt; &lt;/div&gt; &lt;div class="prepend-1 span-3"&gt; &lt;label for="targetStatusID"&gt;Status&lt;/label&gt; &lt;/div&gt; &lt;div class="span-3"&gt; &lt;label for="targetBusinessUnitID"&gt;Business Unit&lt;/label&gt; &lt;/div&gt; &lt;div class="span-3 prepend-1"&gt; &lt;label for="targetStartDate"&gt;Start Date&lt;/label&gt;&lt;/div&gt; &lt;div class="span-3 prepend-2"&gt; &lt;label for="targetEndDate"&gt;End Date&lt;/label&gt; &lt;/div&gt; &lt;div class="prepend-1 span-3 last"&gt; &amp;nbsp &lt;/div&gt; &lt;div class="prepend-1 span-2"&gt; @Html.DropDownList("targetPriorityID", new SelectList(ViewBag.Priorities as System.Collections.IEnumerable, "ID", "Title"), "All") &lt;/div&gt; &lt;div class="prepend-1 span-3"&gt; @Html.DropDownList("targetStatusID", new SelectList(ViewBag.Statuses as System.Collections.IEnumerable, "ID", "Title"), "All") &lt;/div&gt; &lt;div class="span-3"&gt; @Html.DropDownList("targetBusinessUnitID", new SelectList(ViewBag.BusinessUnits as System.Collections.IEnumerable, "ID", "Title"), "All") &lt;/div&gt; &lt;div class="span-3 prepend-1"&gt; @Html.TextBox("targetStartDate", "") &lt;/div&gt; &lt;div class="span-3 prepend-2"&gt; @Html.TextBox("targetEndDate", "") &lt;/div&gt; &lt;div class="prepend-1 span-3 last"&gt; &lt;input type="submit" value="Hide" /&gt; &lt;/div&gt; &lt;br /&gt; &lt;br /&gt; &lt;br /&gt; &lt;/div&gt; } &lt;div id="ticketsTable"&gt; @Html.Partial("_AllTickets", Model) &lt;/div&gt; </code></pre> <p>and then in a separate file AJAXify it:</p> <pre><code>$(function() { $('form :input').change(function() { var form = $('form'); $.ajax({ url: form.attr('action'), type: form.attr('method'), data: form.serialize(), success: function(result) { $('#ticketsTable').html(result); } }); }); }); </code></pre> <p>Another improvement I that I would suggest you is to use view models and get rid of <code>ViewData</code> and use strongly typed helpers.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload