Can I easily trim the whitespace for a databound HyperLinkColumn?

S

Sean Aitken

Does anyone know the easiest way to trim the whitespace from a CHAR(...)
bound value coming from a database and used with a HyperLinkColumn?

In this case, the column is setup using:
....
<asp:HyperLinkColumn Text="Edit Taxes" DataNavigateUrlField="AccountID"
DataNavigateUrlFormatString="TaxDetail.aspx?id={0}&amp;src=accts"></asp:HyperLinkColumn>
....

The problem is that the output looks like:
".../TaxDetail.aspx?id=00044%20%20%20%20%20%20%20%20%20%20%20&src=accts"

So, I want to trim the data from the DB before it binds to the column
for all rows.

I have looked at the format string options, but I can't see any way to
do it with the format string.

Any ideas?

Cheers!
-Sean
 
G

Guest

Select RTRIM(AccountID) As AccountID, ... From ...

HTH

Elton Wang
(e-mail address removed)
 

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,994
Messages
2,570,223
Members
46,812
Latest member
GracielaWa

Latest Threads

Top