How to remove white space from a string

Greetings,

I am using query string to pass the variable as the following.

<td><a href='details.aspx?po=<%#DataBinder.Eval(Container.DataItem, "af1")%>&facct=<%#DataBinder.Eval(Container.DataItem, "funding_code")%>'>

But I got "<td><a href='details.aspx?po=D633963                       &facct=2-89064" from the string. it seems there are white space in <%#DataBinder.Eval(Container.DataItem, "af1")%>

How to remove those white spaces?

Thanks.
mrongAsked:
Who is Participating?
 
bruintjeCommented:
yes i saw that, was only wondering what language you're using for inline coding

can't you do something like

<td><a href='details.aspx?po=<%#Trim(DataBinder.Eval(Container.DataItem, af1"))%>&facct=<%#Trim(DataBinder.Eval(Container.DataItem, "funding_code"))%>'>
0
 
bruintjeCommented:
Hi mrong,

you can use a trim around the value

Trim(DataBinder.Eval(Container.DataItem, "af1"))

hope this helps a bit
bruintje
0
 
mrongAuthor Commented:
What should I do in my case?

Thanks.
0
 
bruintjeCommented:
are you using C#?
0
 
mrongAuthor Commented:
asp.net
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.