主题:Microsoft Visual Studio 2005识别不识别模版
以下一段代码中编译器不识别<headertemplate>,<itemtemplate>,<footertemplate>
为啥? 请高手指教。谢谢!
<controls:simplepager id="items" runat="server" pagesize="4" emptytext="记录为空" onpageindexchanged="PageChanged">
<headertemplate>
<table cellpadding="0" cellspacing="0">
<tr class="gridHead">
<td>编号</td>
<td>名称</td>
<td>价格</td>
<td> </td>
</tr>
</headertemplate>
<itemtemplate>
<tr class="gridItem"> <td><%# DataBinder.Eval(Container.DataItem, "Id") %></td> <td><a href='ItemDetails.aspx?itemId=<%# DataBinder.Eval(Container.DataItem, "Id") %>' class="text"><%# DataBinder.Eval(Container.DataItem, "Name") %></a></td>
<td class="num"><%# DataBinder.Eval(Container.DataItem, "Price", "{0:c}") %></td>
<td><a href='ShoppingCart.aspx?itemId=<%# DataBinder.Eval(Container.DataItem, "Id") %>'><img src="Images/buttonAdd.gif" alt="Add to Cart" border="0"></a></td>
</tr>
</itemtemplate>
<footertemplate>
</table>
</footertemplate>
</controls:simplepager>
为啥? 请高手指教。谢谢!
<controls:simplepager id="items" runat="server" pagesize="4" emptytext="记录为空" onpageindexchanged="PageChanged">
<headertemplate>
<table cellpadding="0" cellspacing="0">
<tr class="gridHead">
<td>编号</td>
<td>名称</td>
<td>价格</td>
<td> </td>
</tr>
</headertemplate>
<itemtemplate>
<tr class="gridItem"> <td><%# DataBinder.Eval(Container.DataItem, "Id") %></td> <td><a href='ItemDetails.aspx?itemId=<%# DataBinder.Eval(Container.DataItem, "Id") %>' class="text"><%# DataBinder.Eval(Container.DataItem, "Name") %></a></td>
<td class="num"><%# DataBinder.Eval(Container.DataItem, "Price", "{0:c}") %></td>
<td><a href='ShoppingCart.aspx?itemId=<%# DataBinder.Eval(Container.DataItem, "Id") %>'><img src="Images/buttonAdd.gif" alt="Add to Cart" border="0"></a></td>
</tr>
</itemtemplate>
<footertemplate>
</table>
</footertemplate>
</controls:simplepager>