Previous post
<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %
<%
MvcApplication1.Models.FeaturesRepository _model = new MvcApplication1.Models.FeaturesRepository();
%
<% foreach (var md in _model.GetAllFeatures())
{ %
<%--<% if (md.int_ParentId == 0)
{ %--%
<%= md.vcr_FeaturesName %
<%--<% } %--%
<% } %
It is with reference to the previous post above.Is there something wrong with the foreach loop(The result is correct but it is displaying the series of Add,Add,Add,Add,Add,Add...,which is the last record of the getallfeatures.