<% %>内联,找不到定义???
前台代码:
<% foreach (Entity.Product p in lp)
{
%>
<TD align="center" valign="top">
<a href="<%=p.Pname%>" target="_blank"><img src="upfile/<%=p.Pimgurl%>" width="90" height="50" /></a></td><td style="width: 25px"> </td>
<%} %>
后台代码:
public List<Product> lp;
lp = SWH.Data.Accesser<Product>.List.FindAll(s=>s.CategoryId==1);
lp.Sort();
为何前台说找不到定义lp, 我用的是否vs2005。不知道是什么原因?