Showing posts with label Razor. Show all posts
Showing posts with label Razor. Show all posts

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)





}
Read More
Powered By Blogger · Designed By Seo Blogger Templates