如何在linkbutton中显示文本 [英] how to appear text in linkbutton

查看:124
本文介绍了如何在linkbutton中显示文本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨伙计们,



i使用asp.net中的链接按钮有点问题



这是我的代码:



hi guys,

i have a little problem using the link button in asp.net

here is my code:

<asp:LinkButton ID="Download" runat="server" onclick="Download_Click" CommandArgument='<%# videoName %>' >Click To Download 

my problem is, the text "Click To Download" does not show but it show the value inside the CommandArgument='<%# videoName %>'. also have tried:

<asp:LinkButton ID="Download" text="Click To Download" runat="server" onclick="Download_Click" CommandArgument='<%# videoName %>' />





但同样的事情发生了。



请帮帮我这些家伙..谢谢



but same thing happened.

please help me with this guys.. thank you

推荐答案

使用Text属性:

Use the Text property:
<asp:linkbutton id="Download" runat="server" onclick="Download_Click" commandargument="<%# videoName %>" xmlns:asp="#unknown">Text="Click To Download" /></asp:linkbutton>

<asp:linkbutton id="LinkButton1" runat="server" xmlns:asp="#unknown">This India</asp:linkbutton>


请检查你的onclick甚至t ...你在javascript中做了一些错误..

还有一件事,当你将值绑定到链接按钮时动态使用以下systax

CommandArgument =''< %#Bind(columnName)%>''
Please check your onclick event... you done some thing wrong in javascript..
and one more thing when u bind value to link button dynamically use following systax
CommandArgument=''<%# Bind("columnName")%>''


这篇关于如何在linkbutton中显示文本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆