c# - How do i Show ViewBag in html -
im trying shown details of products (shoes=zapatillas) on visual studio 2013 c# mvc ok let's go codes... part of index web page on homecontroller http://pastebin.com/vrmb85qf
this producto.cs http://pastebin.com/a2h1ifzt
and index.cshtml want put details, question is, how call sql details in html price, model, info @ @zap fail code, it's that? on
on top page @using la_esquina_del_calzado1.models; in body... @foreach (producto zap in viewbag.lstproductos) { @zap.getid() @zap.getmodelo() @zap.getcolor() } <div class="col-sm-4 col-lg-4 col-md-4"> <div class="thumbnail"> <img src="http://placehold.it/320x150" alt=""> <div class="caption"> <h4 class="pull-right">price</h4> <h4> <a href="#">model</a> </h4> <p>info</p> </div> </div> </div>
i think have loop on viewbag.productos not viewbag.lstproductos
Comments
Post a Comment