string - Textbox, delete button [c#] -


to add new letter textbox use

textbox.text = textbox.text + " "; 

adds space etc., simple

but didnt figured out how can delete last line

for examp.

text of textbox abcdefg

and when user clicks delete, text "abcdef" "adcde" etc.

how can ?

i tried search web failed because dont know how search such thing ^^

string text = textbox.text; if(!string.isnullorempty(text))     textbox.text = text.substring(0,text.length-1); 

Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -