模板错误
代码:
<%@ Page language= "c# " AutoEventWireup= "false "%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN " >
<HTML>
<HEAD>
<title> WebForm1 </title>
<script language= "C# " runat= "server ">
void Page_Load(Object Sender,EventArgs e)
{
if(!IsPostBack)
{
ArrayList values=new ArrayList();
values.Add( "Jerry ");
values.Add( "Tom ");
values.Add( "Li Ming ");
values.Add( "Zhu Chaohui ");
values.Add( "George ");
Repeater1.DataSource=values;
Repeater1.DataBind();
}
}
</script>
</HEAD>
<body MS_POSITIONING= "GridLayout ">
<h3> Repeater Sample </h3>
<form id= "Form1 " runat= "server ">
<FONT face= "宋体 "> </FONT> <b> Student Info Repeater: </b>
<P>
<asp:Repeater ID= "Repeater1 " OnLoad= "Page_Load " Runat= "server ">
<HeaderTemplate>
<table border = "1 ">
</HeaderTemplate>
<ItemTemplate>
<tr>
<td>
<% Container.DataItem%>
</td>
</tr>
</ItemTemplate>
<FooterTemplate>
</table>
</FooterTemplate>
</asp:Repeater>
</P>
</form>
</body>
</HTML>
------------------------------
编译错误
说明: 在编译向该请求提供服务所需资源的过程中出现错误。请检查下列特定错误详细信息并适当地修改源代码。
编译器错误信息: CS1002: 应输入 ;
源错误:
行 121: #line default
行 122: #line hidden
行 123: __output.Write( "\r\n\t\t\t\t\t\t </td> \r\n\t\t\t\t\t\t </tr> \r\n\t\t\t\t\t\r\n\t\t\t\t\t ");
行 124: }
行 125:
大虾们 帮忙看看!
------解决方案--------------------