<asp:panel id="p1" runat="server">
<asp:datalist id="dl1" runat="server" Width="100%" RepeatColumns="1" ShowFooter="False" ShowHeader="False">
<ItemTemplate> 
<a href=' javascript:varwin=window.open('zhinforshow.aspx?<%# DataBinder.Eval(Container.DataItem, "ID") %>',null,'width=500,height=400');window.Close();>'<font  size="2" color="#0000CC"> 你有新的短消息<img src="images/mail.gif" width="15" height="15" border="0" > </a>
</ItemTemplate>
</asp:datalist>
</asp:panel>

解决方案 »

  1.   

    <a href=' javascript:varwin=window.open("zhinforshow.aspx?<%# DataBinder.Eval(Container.DataItem, "ID") %>,null,width=500,height=400");window.Close();><font  size="2" color="#0000CC">你有新的短消息</font> <img src="images/mail.gif" width="15" height="15" border="0" > </a>问题出在以下几点
    1<a></a>中的href必须用"" 如果你是生成的需要用chr(34)
    2.不要给open的里面加“'”,因为open方法的分割符号是“,”