Replace Text in a TextBox HELP?!
Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Hello Guys,
i never had problems with the textbox.text.replace function but this time anyway it wont work...
So my Problem is i have a Textbox,Button and WebBrowser , i navigate to youtube trough the text from my textbox and the textbox shows me later the actual url soo...
and i added this code to replace some lines from the url in the textbox
i never had problems with the textbox.text.replace function but this time anyway it wont work...
So my Problem is i have a Textbox,Button and WebBrowser , i navigate to youtube trough the text from my textbox and the textbox shows me later the actual url soo...
and i added this code to replace some lines from the url in the textbox
Code: Select all
But anyway it wont work , it doesnt replace the text in it , someone can help ?!textbox1.text.replace("http://www.youtube.com/watch?v="," ")
textbox1.text.replace("&feature=related"," ")
Last edited by Napster1488 on Sat Mar 12, 2011 10:30 pm, edited 1 time in total.
try:
Code: Select all
Textbox1.text = textbox1.text.replace("http://www.youtube.com/watch?v="," ")
Agust1337 wrote:try:doesnt work , after added this code in the textbox i got "about:blank"Code: Select allTextbox1.text = textbox1.text.replace("http://www.youtube.com/watch?v="," ")
Napster1488 wrote:Add it as a code not in the textboxAgust1337 wrote:try:doesnt work , after added this code in the textbox i got "about:blank"Code: Select allTextbox1.text = textbox1.text.replace("http://www.youtube.com/watch?v="," ")
I added it as Code,to the WebBrowser DocumentCompleted Event.
Agust1337 wrote:try the Navigated eventDoesnt work too :(
Code: Select all
Cheap. :PRichTextBox1.Text = TextBox1.Text
RichTextBox1.Text.Replace("find","replacewith")
TextBox1.Text = RichTextBox1.Text
Zulf wrote:Ill try it. Thanks!Code: Select allCheap. :PRichTextBox1.Text = TextBox1.Text RichTextBox1.Text.Replace("find","replacewith") TextBox1.Text = RichTextBox1.Text
If I remember right, you MUST do it this way:
Code: Select all
TextBox1.Text = TextBox1.text.Replace("original", "new")
Copyright Information
Copyright © Codenstuff.com 2020 - 2023