Linkbutton.text is empty...

J

JeffP@Work

There must be an easier way....

My link button text value is always empty on ItemCommand

'gets the current datagrid
Dim dg as Datagrid = e.Item.NamingContainer

'aspx has
<asp:LinkButton id="btnSelectSMFC" CommandName=="SelectCallsSMFC"

I've tried...

dim myText = Ctype(e.Item.CommandSource).Text

For each item as DataGridItem in dgItems

dim lnkBtn as Linkbutten = item.FindControl("btnSelectCallsSMFC")

dim lbl as Label = item.FindControl("btnSelectCallsSMFC")

I do get text values of my <asp:BoundColumn's

Painfully, but perhaps my only way will be to make not visible shadow
columns for each linkbutton column.

TIA

JeffP.....
 
J

JeffP@Work

My error, <asp:TemplateColumns with a linkButton: although intellisense
doesn't offer a Text= adding it as Text='<% # DataBinder.Eval(Container,
"DataItem.FieldName") %>... JeffP....
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,904
Latest member
HealthyVisionsCBDPrice

Latest Threads

Top