Click here to Skip to main content
15,899,000 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
@if (@Html.Raw(@ViewData["Message"]) == null)
{

foreach (var c in ViewBag.Fnames)
{
//i = i + 1;
//string str = "categories";
//str = str + i;
<label class="checkbox">
<input type="checkbox" name=sid value=c > @c
</label>


}
}

else
{

@Html.Raw(@ViewData["Message"])
}











////////////////////////////////////////////////////////////////////////////////


I have to use the above code But the foreach loop does'nt work propperly.......
Posted
Comments
R-a-v-i-k-u-m-a-r 11-Mar-14 5:54am    
are you getting any errors? what problems you are facing?
ilaya muthumanickam 12-Mar-14 0:43am    
yes I have face one problem the if condtion only execute could'nt enter into the foreach,But now i solve that problem thanks for your reply...

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