Click here to Skip to main content
15,886,634 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I want to show like this. where Fruit and Coffee is Property Table. And Apple, Orange, Super and Premium are Property Category Table.

Fruit
Apple Orange Mango
Coffee
Super Premium

Here is my code. But it only show latest record.
In View

@foreach (var property in ((List<SelectListItem>)ViewBag.MT_PROPERTY)){
<label>@property.Text</label>
@foreach (var propertycategory in ((List<SelectListItem>)ViewBag.MT_PROPERTYCATEGORY)){
<input type="checkbox"value="@propertycategory.Value" name="chkPropertyCategory">@propertycategory.Text</label>
}
Posted
Updated 5-Feb-15 20:50pm
v4
Comments
Jameel VM 6-Feb-15 8:40am    
what you mean by Latest record? how you are settings values to those properties?
code icecream 9-Feb-15 1:49am    
Latest Record means my display is shows
Fruit
Super Premium
Coffee
Super Premium
These values are retrieved from the table.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900