I know that it is possible to do this using Request.Form.GetValues
Here is the view
<div class="input-group"> <input name="searchString" type="text" id="searchString" class="form-control"/> <span class="input-group-btn"> <button class="btn btn-default" type="button" value="Search" id="btnSearch" >Поиск</button> </span> </div> Looks like a controller
var searchString = Request.Form.GetValues("searchString").FirstOrDefault(); if (!string.IsNullOrEmpty(searchString)) { activeDirectory = activeDirectory.Where(a => a.DisplayName != null && a.DisplayName.Contains(searchString) || a.Company != null && a.Company.Contains(searchString)); } But when you start, an error occurs:
Anonymous of type 'System.ArgumentNullException' occurred in System.Core.dll but it was not handled in user code
Additional information: Value may not be null.
How do I solve this problem? Data loading goes, through JSON I need to do this using jquery.
