Help with ASP.net Strings

Associate
Joined
12 Jun 2003
Posts
2,033
Location
Either Tonbridge or Biggin Hill
Hi,
I have a listbox populated with items in the format 'Store Name (XXY)'

I want to set a string variable to the three characters between the brackets.

Is there any easy way of doing this in ASP.net?
 
You should be able to select a substring using the charachter index in some way. Im a c# man though so cant tell you how to do it in VB.

in c# it would be somthing like string newString = oldstring.Substring(12,3) I guess.
 
I take it the list items are dynamic ? if so when you'll need to get the posiiton of the "(" and ")" within the string in order the create the subsring correctly
 
Back
Top Bottom