jquery - Removing my razor tag prevents me from using my viewmodel in my post -
if have razor element looks inside html.beginform() on vie
@html.enumdropdownlistfor(model => model.listing.locationtype)
but have replace razor syntax , use html bootstrap because want more custom drop down menu 1 razor gives me.
ex. want group of buttons nested drop down menu
<div id="locationtypeselector" class="btn-group btn-group-lg" role="group" aria-label="..."> <button type="button" class="btn btn-default spacetype">home</button> <button type="button" class="btn btn-default spacetype">apartment</button> <button type="button" class="btn btn-default spacetype">studio</button> <div class="btn-group btn-group-lg" role="group"> <button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false"> other <span class="caret"></span> </button> <ul class="dropdown-menu" role="menu"> <li><a class="spacetype">park</a></li> <li><a class="spacetype">beach</a></li> <li><a class="spacetype">field</a></li> <li><a class="spacetype">backyard</a></li> <li><a class="spacetype">frontyard</a></li> <li><a class="spacetype">other</a></li> </ul> </div> </div> so i'm not setting viewmodel property 'locationtype' , i'm forced set values jquery/javascript , on form submit use jquery's ajax or post , submit way, eliminate html.beginform() , viewmodel entirely! missing here!? or not doing correctly??
Comments
Post a Comment