Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi guys,

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

here is my code:

ASP.NET
<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
Posted
Updated 14-Jan-13 16:49pm
v2

Use the Text property:
HTML
<asp:linkbutton id="Download" runat="server" onclick="Download_Click" commandargument="<%# videoName %>" xmlns:asp="#unknown">Text="Click To Download" /></asp:linkbutton>
 
Share this answer
 
C#
<asp:linkbutton id="LinkButton1" runat="server" xmlns:asp="#unknown">This India</asp:linkbutton>
 
Share this answer
 
v2
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")%>'
 
Share this answer
 
C#
<asp:linkbutton id="LinkButton1" commandargument="<%# Eval("OrganisationID") %>" commandname="Delete" runat="server" xmlns:asp="#unknown"><img src="pathtoimage.jpg" alt="delete group" />delete</asp:linkbutton>
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900