Saturday, September 15, 2012

MVC 3: Generate Textbox or labels in Foreach Loop

@foreach (var item in Model )
{







@Html.LabelFor(a=> item.ItemName)



@Html.LabelFor(a => item.Description)




@Html.LabelFor(a => item.Qty)



@Html.TextBoxFor(a => item.Price)





}

Share This!


No comments:

Powered By Blogger · Designed By Seo Blogger Templates