Text box value to another textbox [Resolved]

Posted by Vinokanna under C# on 10/8/2013 | Points: 10 | Views : 816 | Status : [Member] | Replies : 3
Hi,

text box value : 12345678-abcdefgh
I want the text box value to be passed to another text box without the number
only abcdefgh only abcdefgh to be passed any one please help me.thanks in advance.




Responses

Posted by: Brahmam on: 10/9/2013 [Member] Starter | Points: 50

Up
0
Down

Resolved

string[] values = txtTest.Text.Split('-');
string text = values[0].Trim();
string text1 = values[1].Trim();
txttest2.Text = text1;

brahmam

Vinokanna, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Pradeepmanne on: 10/8/2013 [Member] Starter | Points: 25

Up
0
Down
hi,
Use Split to separate parts from a string.

Vinokanna, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Kmandapalli on: 10/8/2013 [Member] Silver | Points: 25

Up
0
Down
Hi,

Use can use the string methods like split, index , remove etc..

Mark as answer if satisfied....
Regards,
Shree M.

Kavya Shree Mandapalli

Vinokanna, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response