iam use MVC Partial view .I have a two of Page AddPoll.cshtml and Listpoll.cshtml. page AddPoll.cshtml use Partial view. I use AddPoll:partial view page to be placed a partial view with Listpoll.

    @Html.Partial("/Areas/admin/Views/Poll/AddPoll.cshtml",new Mvc_baker.Areas.admin.Models.pollquestion()); here

this code AddPoll

 @model Mvc_baker.Areas.admin.Models.pollquestion

{@using (Html.BeginForm(actionName: "AddPoll", controllerName: "Poll"))

     @Html.ValidationSummary(true, "", new { @class = "text-danger" })
    <form class="">
        <div class="col-md-6">
            <div class="panel panel-primary">
                                 <label class="control-label">پرسش</label>
                                 @Html.TextBoxFor(m => m.QuestionText, new { id = "Name",style="width:450px", @class = "form-control" })
                            @Html.ValidationMessageFor(m => m.QuestionText)
                              <input class="btn btn-primary btn-default" name="commit" value="register" type="submit">
                    </div>
 </div>
    </form>
}

When I click the register button control action is Not applicable

When the breakpoint action on control and I can not run

Related posts

Recent Viewed