MVC Razor for loop

后端 未结 6 876
野趣味
野趣味 2021-02-13 10:29

I have this code (nested inside a form post) but am continually getting the error that it\'s missing the closing }

@for(int i=0;i< itemsCount         


        
6条回答
  •  我寻月下人不归
    2021-02-13 11:15

    Try to enclose your for loop body between text tag.

    http://weblogs.asp.net/scottgu/archive/2010/12/15/asp-net-mvc-3-razor-s-and-lt-text-gt-syntax.aspx

提交回复
热议问题