❔ Replace space with Hyphen in a text box as i type
Hi can someone please help i have tried this MyGlobalVarables.ProjectName = textBox1.Text.Replace(" ","-"); but it is not working
5 Replies
more context
Hi i have a textbox on a form i want the text box to replace the space character with a hyphen when i type like (abc-def-123)
well then set the text property on the textbox
you're setting dome global variable
Do you just want the output to be with hyphens instead of spaces? or do you want the hyphens to also show in that texbox?
If the latter, you'd run your replacing code on input
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.