[Help]Replace word in textbox1

Posts 1–5 of 5 · Page 1 of 1
[Help]Replace word in textbox1
How do you replace a word in a textbox with something else. Like this

If TextBox1.Text.Contains("[Hello]")
TextBox1.Replace("[Bye]")

But there is no replace function in textbox1.text.
Uh.
Can't you just use;
[php]If TextBox1.Text.Contains("[Hello]")
Then TextBox1.Text = "[Bye]"[/php]

BTW you forgot the THEN
Quote Originally Posted by ppl2pass View Post
How do you replace a word in a textbox with something else. Like this

If TextBox1.Text.Contains("[Hello]")
TextBox1.Replace("[Bye]")

But there is no replace function in textbox1.text.

This will replace all [Hello] with [Bye] .

[php]If TextBox1.Text.Contains("[Hello]") Then
Textbox1.Text.Replace("[Hello]","[Bye]")
End If[/php]

@Water: That will remove all the text and just write "[Bye]". He just wants replacement of [Hello] with [Bye].
Ohh okay. Thanks.
Easy string manipulation, there is a whole article on it : Also, Please use tags [Help].[Release].[Source] Etc. etc.

Posts 1–5 of 5 · Page 1 of 1
This thread is closed for replies.

Similar Threads

Tags for this Thread

None

Talk with us