本文介绍了错误的GridView设置CommandArgument PROPERT的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我将我自己的按钮,GridView控件的删除功能。但是似乎我不能得到正确设置它。
I was adding my own button to GridView for Delete functionality. However it seems I can't get to set it properly.
<asp:Button ID="btnDelete" runat="server" Text="Delete"
CommandName="BtnEditDelete"
CommandArgument="<%# DataBinder.Eval(Container.DataItem, "empID", "{0}") %>"/>
Error Shown: Server tag not well formed
Line 36:
CommandName="BtnEditDelete" CommandArgument="<%# DataBinder.Eval(Container.DataItem,
"empID", "{0}") %>"/>
哪个属性已设置我错?
Which property have I set wrongly ?
推荐答案
试试这个
<asp:Button ID="btnDelete" runat="server" Text="Delete"
CommandName="BtnEditDelete"
CommandArgument='<%# DataBinder.Eval(Container.DataItem, "empID", "{0}") %>'/>
这篇关于错误的GridView设置CommandArgument PROPERT的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!