E
E
Elena2015-11-16 15:28:05
ASP.NET
Elena, 2015-11-16 15:28:05

Why doesn't it go to Post request in section?

On the page where the date picker is needed, I insert the bootstrap datepicker, it works. But as soon as I place it in the section it doesn't go to the post request. Why?

@section SelectDate {
    @using (Html.BeginForm("GetList", "Home", new { IsPlan = (bool)ViewBag.IsPlan }))
    {
        <form class="form-inline" role="form">
            <div class="form-group">
                <div class='input-group date' id='datetimepicker'>
                    <input type='text' class="form-control" name="date" value="Выберите дату" />
                    <span class="input-group-addon">
                        <span class="glyphicon glyphicon-calendar"></span>
                    </span>
                </div>
            </div>
            <button type="submit" class="btn btn-default">Ок</button>
        </form>
    }
}

The issue has been resolved! In _Layout, I put another form, which knocked it down. Fixed on div and it worked
<div class="navbar-form navbar-left" >
             @RenderSection("selectDate", false)
 </div>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry Kovalsky, 2015-11-16
@dmitryKovalskiy

And what actually happens? What is rendered to the client? Are there any errors in the browser console? Bootstrap is a client framework, Razor is a server framework. They don't care about each other, they shouldn't depend on each other.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question