tags:

views:

43

answers:

2

I have text in a textbox. The content is "10/BSC/01".

"10" = current year

"BSC" = department

"01" = the roll number of student

If I press a command button the "01" should be incremented without affecting the other fields.

What should I do ?

A: 

pseudocode:

dim arry = textbox.text.split("/")
dim num = ctype(arry(2),int)
num +=1
numstr = num.tostring(prefix with 0)
textbox.text = arry(0) + "/" + arry(1) + "/" + numstr

eych