Trim Dropdown box with an ObjectDataSource and FileDataSet

Posted on 2006-04-24
Last Modified: 2008-03-10
I am using an objectdatasource and a filedataset page to populate a dropdown menu form a database. It works greate but the value has a bunch of trailing whitespaces. How do I trim it so the value does not have the white spaces?
Question by:jui2ce
    LVL 29

    Accepted Solution

    You can always trim the value in sql server level. That's the most cleanest way to solve the problem.
    select ltrim(rtrim(name)),userid from tbluser ' mssql

    Author Comment

    Worked like a charm. THANKS

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
    International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
    Sending a Secure fax is easy with eFax Corporate ( First, Just open a new email message.  In the To field, type your recipient's fax number You can even send a secure international fax — just include t…
    This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor ( If you're looking for how to monitor bandwidth using netflow or packet s…

    758 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now