c# - Form tag is not rendering only for first item asp.mvc -
@model ienumerable<transferlistitemmv> @if (model != null && model.count()>0) { for(int i=0;i<model.count();i++) { <div class="col-md-4 @(i%3==0?"border":string.empty)"> <!-- container--> @html.partial("_transferlistitem", ((list<transferlistitemmv>)model)[i]) <!-- end of container--> </div> if (i%3==2) { <div class="clearfix"></div><br /> } } <div class="offset-2"><hr class="featurette-divider3"></div> }
_transferlistitem is
@model transferlistitemmv <div class="carscontainer"> @using (html.beginform("addbookservicetransfer", "payment", formmethod.post, new { id = "frm" + model.id.tostring() })) { <div class="center"> <img src=@model.image alt="" /> </div> <div class="hpadding20"> <span class="glyphicon glyphicon-info-sign right lblue cpointer" data-toggle="modal" data-target="#transfer@(model.id)"></span> <div id="transfer@(model.id)" class="modal fade"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> <h4 class="modal-title">detailed information</h4> </div> <div class="modal-body"> @(new htmlstring(model.description)) </div> <div class="modal-footer"> <button type="button" class="btn btn-default" data-dismiss="modal">close</button> </div> </div> </div> </div> <span class="size14 bold dark">@model.shortdescription</span><br /> <span class="size13 grey"> <table> <tr> <td class="dark bold" valign="top">from: </td> <td>@model.from</td> </tr> <tr> <td class="dark bold" valign="top">to:</td> <td>@model.to</td> </tr> <tr> <td class="dark bold" valign="top">on:</td> <td>@model.on</td> </tr> </table> </span> </div> <div class="purchasecontainer"> <span class="size18 bold green mt5">€@(math.round(model.price, 2))</span><br /> <span class="size12 mt-3 grey"> </span> <button class="bookbtn right margtop-20" type="submit">book</button> </div> @html.hiddenfor(m=>m.id) @html.hiddenfor(m => m.xmlservicetransfer.availtoken) @html.hiddenfor(m => m.xmlservicetransfer.transfertype) @html.hiddenfor(m => m.xmlservicetransfer.datefrom) @html.hiddenfor(m => m.xmlservicetransfer.transferinfo.code) @html.hiddenfor(m => m.xmlservicetransfer.transferinfo.type) @html.hiddenfor(m => m.xmlservicetransfer.transferinfo.vehicletype) @html.hiddenfor(m => m.xmlservicetransfer.contractlist.contractlist[0].name) @html.hiddenfor(m => m.xmlservicetransfer.contractlist.contractlist[0].incomingoffice) @html.hiddenfor(m => m.xmlservicetransfer.pickuplocation.code) @html.hiddenfor(m => m.xmlservicetransfer.destinationlocation.code) @html.hiddenfor(m => m.xmlservicetransfer.destinationlocation.transferzone.code) @html.hiddenfor(m => m.xmlservicetransfer.paxes.adultcount) @html.hiddenfor(m => m.xmlservicetransfer.paxes.childcount) @html.hiddenfor(m => m.xmlservicetransfer.arrivaltransferinfo.arrivalinfo.code) @html.hiddenfor(m => m.xmlservicetransfer.arrivaltransferinfo.arrivalinfo.datetime) @html.hiddenfor(m => m.xmlservicetransfer.arrivaltransferinfo.arrivalinfo.code) @html.hiddenfor(m => m.xmlservicetransfer.arrivaltransferinfo.arrivalinfo.datetime) } </div>
when rendering in browser first item has not form tag in asp.mvc
what problem?
thank attention.
you don't seem have expanded <div class="classcontainer">_</div>
did second item. click on ▶
arrow in front of div expand , see <form>
tag that's inside, same way did second div.
Comments
Post a Comment