i have a barcode 41/3/100 ,

100 will be saved in data base when i scan barcode with scanner it will read 41/3/100 when i click the button how should i search the record only with 100 ????

help

Your question is not very clear to me.
Is the barcode 41/3/100 saved in its totality or did you just saved 100 in the DB?
Which button do you click? Please clarify.
The string class has a method called SubString.

you can use String.EndsWith("100")

//Say var1 is the value you get
var1 = "41/3/100";
string[] var2 = var1.split('/');
MessageBox.Show(var2[2]);

@ddanbe

100
101
102 will be saved in database
and the barcode will be
41/3/100
41/3/101
so on..

you can do that in split method.

string val = "41/3/100";
string[] val1 = val.split('/');
console.write("RESULT" + val1[2]);

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.