当前位置:编程学习 > C#/ASP.NET >>

DataGrid 中的imagebutton數據綁定

<asp:TemplateColumn> 
                                                 <HeaderStyle HorizontalAlign="Center" Width=30px> </HeaderStyle> 
                                                 <ItemStyle HorizontalAlign="Center" Width=30px> </ItemStyle> 
                                                 <HeaderTemplate> 
                                                   History  
                                                 </HeaderTemplate> 
                                                 <ItemTemplate> 
                                                    <asp:ImageButton ID="ibnHistory" runat=server AlternateText="History" CommandName="History" ImageUrl="/images/common/buttons/onepart/remove_r.gif" 
                                                    OnClientClick ="DataList('ADUserpersonHistory.aspx?Account= <%#  DataBinder.Eval(Container.DataItem,"User_ID") %>');"/>                                                         
                                                 </ItemTemplate> 
                                             </asp:TemplateColumn> 


這里OnClientClick ="DataList('ADUserpersonHistory.aspx?Account= <%#  DataBinder.Eval(Container.DataItem,"User_ID") %>');"出錯了:Error 1 The server tag is not well formed. 

請問這樣書寫有錯誤嗎?謝謝先。 
--------------------编程问答-------------------- 不是已经报错了么?
LZ为什么要这样写??想实现什么功能?? --------------------编程问答--------------------
runat=server 是不是要写成runat="server"
DataList('ADUserpersonHistory.aspx....');
这个能做一条语句?
--------------------编程问答-------------------- DataList是我寫的一個javascript腳本

function DataList(strFile)
{
strFeatures="dialogWidth=300px;dialogHeight=300px;center=yes;status=no;help=no";
showModalDialog(strFile,"_blank",strFeatures);
}
想生成一個模式對話框,傳一個參數。 --------------------编程问答-------------------- 我是想問應該怎么寫,才正確。
补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,