473,498 Members | 1,942 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Can I easily trim the whitespace for a databound HyperLinkColumn?

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
Nov 19 '05 #1
1 1769
Select RTRIM(AccountID) As AccountID, ... From ...

HTH

Elton Wang
el********@hotmail.com
"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

Nov 19 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

22
12717
by: Simon | last post by:
Hi, I have written a function to trim char *, but I have been told that my way could be dangerous and that I should use memmove(...) instead. but I am not sure why my code could be 'dangerous'...
4
3938
by: Matt | last post by:
I want to confirm there is not built-in trim() function in javascript. If I need one, I need to implement my own needs. please advise. Thanks!!
9
6262
by: Durgesh Sharma | last post by:
Hi All, Pleas help me .I am a starter as far as C Language is concerned . How can i Right Trim all the white spaces of a very long (2000 chars) Charecter string ( from the Right Side ) ? or how...
11
5323
by: Darren Anderson | last post by:
I have a function that I've tried using in an if then statement and I've found that no matter how much reworking I do with the code, the expected result is incorrect. the code: If Not...
31
2859
by: rkk | last post by:
Hi, I've written a small trim function to trim away the whitespaces in a given string. It works well with solaris forte cc compiler, but on mingw/cygwin gcc it isn't. Here is the code: char...
4
5497
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I trim whitespace - trim/trimRight/trimLeft...
121
4983
by: swengineer001 | last post by:
Just looking for a few eyes on this code other than my own. void TrimCString(char *str) { // Trim whitespace from beginning: size_t i = 0; size_t j; while(isspace(str)) {
0
7125
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7002
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
6885
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5462
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4908
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4588
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3081
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1417
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
290
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.