评估方法字符串链接按钮 [英] eval method string linkbutton
本文介绍了评估方法字符串链接按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<ItemTemplate><asp:LinkButton ID="ImgLnk" runat="server"
OnClick="lnkCustomer_Click" CommandName="CustomerLink" Text='<%# DataBinder.Eval(Container.DataItem, "ImgLnk") %>
我已经搜寻了!如何用单词"link"代替显示的数据库内容(URL)的linkbutton文本?
感谢您的帮助.
I have searched and searched! How can I replace the linkbutton text with the word "link" instead of the contents(url) of the database show up?
Thanks for your help.
推荐答案
您可以使用Eval
绑定相同的链接按钮.试试这个:
You can useEval
to bind the same linkbutton. Try this:
<asp:linkbutton id="ImgLnk" runat="server" onclick="lnkCustomer_Click" commandname="CustomerLink" text='<%# Eval("ImgLnk") %>' />
请记住,URL
是gridview数据源中的列,该列将包含所有行的URL''s
.
--Amit
Remember, URL
is the column in your gridview datasource which will contain the URL''s
for all the rows.
--Amit
这篇关于评估方法字符串链接按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文