ASP.NET:The Server tag is not well formed解决

调试程序的时候出现了如下的错误:

   The Server tag is not well formed.

网上找了一下,发现有这么两种情况会出现这样的错误提示:

---------------------

1.使用了重复的双引号(double quotes),比如:

<asp:Button id=but Text="Button" runat="server" CommandArgument="<%# DataBinder.eval_r(Container.DataItem, ("ColIndex")) %>"

这里红色引号部分改成单引号(single quotes),就可以了。

2.runat="server"的控件需要有ID.

posted @ 2011-10-28 16:53  Randolph Liu  阅读(1191)  评论(0)    收藏  举报