samedi 25 mars 2017

WebGrid Search Exception - Error executing child request for handler

I want to make Search in WebGrid but it doesn't work.

I have 2 methods in Controller

    public async Task<ActionResult> ICare()
    {.... return View(tuple);}
    public async Task<ActionResult> ICare(string Search)
    {.... return View(tuple);}

And in View I have

using (Html.BeginForm("ICare", "Communities"))
        <div class="row">
            <div class="patientsearch">
                <div class="col-xs-6 col-md-3">
                    <div class="form-group">
                        <div class="input-group">
                            @Html.TextBox("Search", "", new {placeholder = "Search My Patients", @class = "form-control"})
                            <span class="input-group-btn">
                                <button type="submit" class="btn btn_green">Search</button>

        var grid = new WebGrid(Model.Item1, canSort: false, canPage: true, rowsPerPage: 10);
        <div class="table-responsive">
                mode: WebGridPagerModes.All,
                tableStyle: "table table-hover table-condensed",
                rowStyle: "table-row-clickable",
                headerStyle: "webgrid-header",
                footerStyle: "table-pager",

But it always throw an exception in Layout in this

                          Html.RenderAction("GetUserInfoForMenu", "Menu", new { Area = ""});

Error executing child request for handler 'System.Web.Mvc.HttpHandlerUtil+ServerExecuteHttpHandlerAsyncWrapper

Aucun commentaire:

Enregistrer un commentaire