help calling a function from within a datagrid hyperlinkcolumn

A

Andrew Pasetti

I'm having trouble getting a function to return a string from within a
hyperlinkcolumn. Perhaps someone can suggest what I'm doing wrong. I've used
a test string just to test the function. Unfortunately nothing is being
returned.

Thank you in advance,

Andrew

Within the datagrid:

<asp:HyperLinkColumn Text='<% FormatText("test") %>'
....></asp:HyperLinkColumn>

Within the code behind page:

Public Function FormatText(ByVal strText As String)
Return strText
End Function
 
P

Philip Q [MVP]

Don't you have to databind it? So the column would look like -

<asp:HyperLinkColumn Text='<%# FormatText("test" %>' ....

(addition of #)
 

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

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,014
Latest member
BiancaFix3

Latest Threads

Top