1

I have search field on Page. When I try to search by < all works fine. But if try search by <! it fails. I have simple controller method:

[ValidateInput(false)]
public ActionResult Index(string filter)
{
    var items = data.GetItems(filter);
    var listViewModel = ListViewModel(items)
    return View(listViewModel);
}

Exception occurs on last line of code, when view returns.

UPD:

My view is quite big. On this view I use WebGrid. So in debug app fails on this line:

var gridHtml = grid.GetHtml(
            tableStyle: "grid",
            headerStyle: "header",
            footerStyle: "footer",
            alternatingRowStyle: "alternative",
            columns: Model.Columns,
            numericLinksCount: Model.NumericLinksCount,
            mode: WebGridPagerModes.All

            );
Alexei Malashkevich
  • 1,575
  • 1
  • 17
  • 34

1 Answers1

0

Encoding on client side and decoding on server side solve my problem, but I'm still not sure if this better way.

Alexei Malashkevich
  • 1,575
  • 1
  • 17
  • 34