使用XPath在Gridview中启用/禁用linkButton [英] Enabling/Disabling linkButton in Gridview with XPath
问题描述
我在gridvview中有一个linkbutton,它链接到数据库中的文档.根据该文档的存在/不存在,我要启用/禁用它.
以下是我的代码:
< asp : TemplateField =恢复" ItemStyle-字体大小 =更大">
< ItemTemplate >
< asp : LinkButton =服务器" OnCommand ="GetResume" <%#IsEnabled((XPath(" id))%> '></ asp : </ ItemTemplate > </ asp : TemplateField >
我尝试了使用double和single的不同组合引号等,但无法使之工作.
对此需要帮助.
谢谢.
那里.
感谢您的发帖!我建议将您的问题发布到MS论坛之一中,
首页› 常规ASP .NET »数据表示控件
位于此处: http://forums.asp.net/24.aspx
祝您度过愉快的一天!
>
I have a linkbutton in the gridvview which links to a document in database. Based on presence/absence of that document I want to enable/disable it.
Following is my code:
<asp:TemplateField HeaderText="Resume" ItemStyle-HorizontalAlign="Center" ItemStyle-Font-Size="Larger">
<ItemTemplate>
<asp:LinkButton runat="server" ID="lnkResume" Text="2" Font-Names="wingdings" CommandArgument='<%#XPath("id")%>'
OnCommand="GetResume" Enabled='<%# IsEnabled((XPath("id"))%>'></asp:LinkButton>
</ItemTemplate>
</asp:TemplateField>
I tried different combinations with the double and single quotes etc. but cannot make it work.
Need help on this.
Thank you.
Hi There.
Thank you for your post! I would suggest posting your question in one of the MS forum,
Home › ASP.NET Forums » General ASP.NET » Data Presentation Controls
located here: http://forums.asp.net/24.aspx
Have a great day!
这篇关于使用XPath在Gridview中启用/禁用linkButton的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!