Link to home
Start Free TrialLog in
Avatar of johnqtr
johnqtr

asked on

Stripping out characters...

I have a dropdownlist box that displays a "LotNumber" and I need to stripout the last two characters.  e.g.

Example LotNumber = 301C0M030701-A-2

I need the dropdownlist box to display:

301C0M030701-A

Any help would be appreciated!  Thanks!
SOLUTION
Avatar of Carl Tawn
Carl Tawn
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
or you can just use a left() operation in your query if this data is being returned from a sqlserver etc
Avatar of RealMrTea
RealMrTea

Just an idea for you.

You could place the text in a custom object and then override the ToString() method to perform the above string operations.  This would allow you to take the text from the database and store it directly in an object and then place it in a control and get exactly the output you want.

Later,
Eric
Avatar of johnqtr

ASKER

Sorry, I meant to give the first post 125 points.  Sorry.
unaccepted per your request.