当前位置:编程学习 > 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.

請問這樣書寫有錯誤嗎?謝謝先。
--------------------编程问答--------------------  回帖是一种美德!传说每天回帖即可获得 10 分可用分! --------------------编程问答-------------------- 回帖是一种美德!传说每天回帖即可获得 10 分可用分!Too... --------------------编程问答-------------------- 使用html控件的<img 就可以了 --------------------编程问答-------------------- CommandName="History" --CommandName='History' . --------------------编程问答--------------------    OnClientClick ="DataList('ADUserpersonHistory.aspx?Account= <%#  DataBinder.Eval(Container.DataItem,"User_ID") %>');" --    OnClientClick ="DataList('ADUserpersonHistory.aspx?Account= ' + '<%#  DataBinder.Eval(Container.DataItem,"User_ID") %>');" --------------------编程问答--------------------
引用 5 楼 Kshatriya 的回复:
   OnClientClick ="DataList('ADUserpersonHistory.aspx?Account=  <%#  DataBinder.Eval(Container.DataItem,"User_ID") %>');" --    OnClientClick ="DataList('ADUserpersonHistory.aspx?Account= ' + ' <%#  DataBinder.Eval(Container.DataItem,"User_ID") %>');"
--------------------编程问答-------------------- 回帖是一种美德!传说每天回帖即可获得 10 分可用分! --------------------编程问答-------------------- 不行啊,還是提示一樣的錯誤:The server tag is not well formed --------------------编程问答-------------------- 怎么沒人回啊。
补充:.NET技术 ,  C#
CopyRight © 2022 站长资源库 编程知识问答 zzzyk.com All Rights Reserved
部分文章来自网络,