Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Can I easily trim the whitespace for a databound HyperLinkColumn?

Reply
Thread Tools

Can I easily trim the whitespace for a databound HyperLinkColumn?

 
 
Sean Aitken
Guest
Posts: n/a
 
      05-20-2005
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
 
Reply With Quote
 
 
 
 
=?Utf-8?B?RWx0b24gVw==?=
Guest
Posts: n/a
 
      05-20-2005
Select RTRIM(AccountID) As AccountID, ... From ...

HTH

Elton Wang
http://www.velocityreviews.com/forums/(E-Mail Removed)


"Sean Aitken" wrote:

> 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} &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
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
FAQ Topic - How do I trim whitespace - LTRIM/RTRIM/TRIM? FAQ server Javascript 2 04-24-2007 01:59 AM
FAQ Topic - How do I trim whitespace - LTRIM/RTRIM/TRIM? FAQ server Javascript 26 02-26-2007 05:06 PM
FAQ Topic - How do I trim whitespace - LTRIM/RTRIM/TRIM? FAQ server Javascript 6 12-25-2006 08:47 PM
FAQ Topic - How do I trim whitespace - LTRIM/RTRIM/TRIM? FAQ server Javascript 0 10-25-2006 11:00 PM
FAQ Topic - How do I trim whitespace - LTRIM/RTRIM/TRIM? FAQ server Javascript 0 08-28-2006 11:00 PM



Advertisments