I have a form where I define code masks in a masked textbox, for example CA##### and assign it to a textbox that I am using as the code of relevant form. ( Current Account Code = CA0001).
How can I increment the value automatically?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Ranjit PowarPosted Feb 23, 2016, 12:41 AM
Yucel EmirPosted Feb 23, 2016, 12:33 AM
Yucel EmirPosted Feb 23, 2016, 12:33 AM
Yucel EmirPosted Feb 23, 2016, 12:32 AM
Yucel EmirPosted Feb 23, 2016, 12:32 AM
Yucel EmirPosted Feb 23, 2016, 12:31 AM
Riddhi ValechaPosted Feb 21, 2016, 12:09 PM
MatthiasPosted Feb 21, 2016, 10:27 AM
Ranjit PowarPosted Feb 21, 2016, 8:29 AM
string str= textBox1.Text;
string intPart= str.Substring (3,5);
int nextValue=Convert.ToInt32(intPart)+1;
textBox1.Text="CAR"+ nextValue.ToString("0000");
If it helps you select it as correct answer.
Yucel EmirPosted Feb 21, 2016, 7:02 AM
Vipan SharmaPosted Feb 19, 2016, 11:25 PM
MatthiasPosted Feb 19, 2016, 11:38 AM
Amit Kumar SinghPosted Feb 19, 2016, 8:08 AM
Vipan SharmaPosted Feb 19, 2016, 7:23 AM
Krishna Rajput SinghPosted Feb 19, 2016, 6:57 AM
Amit Kumar SinghPosted Feb 19, 2016, 6:32 AM