NewLine in Constant in Aspx Page

最后都变了- 提交于 2019-12-11 07:29:17

问题


 <table cellpadding="0" cellspacing="0" width="100%"> 
    <%  if(ViewData["CustomerInfoList"] !=null && ((List<SaaSModel.CustomerInfo>)ViewData["CustomerInfoList"]).Count()>0) 
          { 
    %> 
    <tr> 
        <td> 
            <% 
    Html.Grid((List<SaaSModel.CustomerInfo>)ViewData["CustomerInfoList"]).Columns( 
        column=> 
            { 
                column.For(col=>col.CustomerName).Named("Name"); 
                column.For(col=>col.CompanyName).Named("CompanyName"); 
                column.For(col=>col.Description).Named("Description"); 
                column.For(col=>col.CustomerRevenue).Named("CustomerRevenue"); 
                column.For(col=>col.NoOfEmployees).Named("NoOfEmployees"); 
                column.For(col=>col.Vertical).Named("Vertical"); 
                column.For(col=>col.SaleExecutive).Named("SaleExecutive"); 
            }).Attributes(id=>"datalist",@class=>"silicaGrid",cellspacing=>"1",cellpadding=>"0"); 

            %> 
        </td> 
    </tr> 
    <% }%> 
</table>

The above is my aspx. I am getting the error[NewLine in Constant] in this line (in the starting symbol)

<%  if(ViewData["CustomerInfoList"]..........

In this line itself, i am getting "; Expected","IDentifier Expected","Invalid Expression Term" and "NewLine in Constant".

How to solve this.

来源:https://stackoverflow.com/questions/4254323/newline-in-constant-in-aspx-page

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!