You must Sign In to post a response.
  • Category: ASP.Net MVC

    Adding div in loop in MVC5

    Hi. I am working on kind of project where you can order foods online.
    Here, I want to implement function where I can bind all the hotels in page with link Profile, menu, display ratings.
    Please suggest how I bind that data in .cshtml.
    Like, generally, in asp.net, we can use grid view or list view for this purpose.
    But in mvc5, I am confused that how to accomplish this requirement.
    Either i can use div which is create runtime, or table or any other control.?
  • #767406
    Hi,
    Please check this JQuery fiddle:
    http://jsfiddle.net/UGMkq/30/
    You may find 'how to create div dynamically' in MVC over here:
    http://stackoverflow.com/questions/10163305/create-div-dynamically-on-click-of-a-hyperlink-in-asp-net-mvc
    Take care of div id's when you are adding them dynamically.


Sign In to post your comments