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.
15 posts Page 1 of 2
Contributors
User avatar
Napster1488
VIP - Donator
VIP - Donator
Posts: 524
Joined: Fri Jan 07, 2011 8:41 pm

Replace Text in a TextBox HELP?!
Napster1488
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
Code: Select all
textbox1.text.replace("http://www.youtube.com/watch?v="," ")
         textbox1.text.replace("&feature=related"," ")
But anyway it wont work , it doesnt replace the text in it , someone can help ?!
Last edited by Napster1488 on Sat Mar 12, 2011 10:30 pm, edited 1 time in total.
YouTube Downloader v3.0
Image
Image
Image
User avatar
Agust1337
Coding God
Coding God
Posts: 2456
Joined: Fri Feb 19, 2010 8:18 pm

try:
Code: Select all
Textbox1.text = textbox1.text.replace("http://www.youtube.com/watch?v="," ")
Top-notch casual Dating
User avatar
Napster1488
VIP - Donator
VIP - Donator
Posts: 524
Joined: Fri Jan 07, 2011 8:41 pm

Agust1337 wrote:
try:
Code: Select all
Textbox1.text = textbox1.text.replace("http://www.youtube.com/watch?v="," ")
doesnt work , after added this code in the textbox i got "about:blank"
YouTube Downloader v3.0
Image
Image
Image
User avatar
Agust1337
Coding God
Coding God
Posts: 2456
Joined: Fri Feb 19, 2010 8:18 pm

Napster1488 wrote:
Agust1337 wrote:
try:
Code: Select all
Textbox1.text = textbox1.text.replace("http://www.youtube.com/watch?v="," ")
doesnt work , after added this code in the textbox i got "about:blank"
Add it as a code not in the textbox
Top-notch casual Dating
User avatar
Napster1488
VIP - Donator
VIP - Donator
Posts: 524
Joined: Fri Jan 07, 2011 8:41 pm

I added it as Code,to the WebBrowser DocumentCompleted Event.
YouTube Downloader v3.0
Image
Image
Image
User avatar
Agust1337
Coding God
Coding God
Posts: 2456
Joined: Fri Feb 19, 2010 8:18 pm

try the Navigated event
Top-notch casual Dating
User avatar
Napster1488
VIP - Donator
VIP - Donator
Posts: 524
Joined: Fri Jan 07, 2011 8:41 pm

Agust1337 wrote:
try the Navigated event
Doesnt work too :(
YouTube Downloader v3.0
Image
Image
Image
User avatar
Zulf
Serious Programmer
Serious Programmer
Posts: 441
Joined: Fri Jun 11, 2010 7:46 am

Re: Replace Text in a TextBox HELP?!
Zulf
Code: Select all
RichTextBox1.Text = TextBox1.Text
RichTextBox1.Text.Replace("find","replacewith")
TextBox1.Text = RichTextBox1.Text
Cheap. :P
Image
User avatar
Napster1488
VIP - Donator
VIP - Donator
Posts: 524
Joined: Fri Jan 07, 2011 8:41 pm

Zulf wrote:
Code: Select all
RichTextBox1.Text = TextBox1.Text
RichTextBox1.Text.Replace("find","replacewith")
TextBox1.Text = RichTextBox1.Text
Cheap. :P
Ill try it. Thanks!
YouTube Downloader v3.0
Image
Image
Image
User avatar
bisnes_niko
Serious Programmer
Serious Programmer
Posts: 409
Joined: Tue Aug 24, 2010 1:21 pm

If I remember right, you MUST do it this way:
Code: Select all
TextBox1.Text = TextBox1.text.Replace("original", "new")
15 posts Page 1 of 2
Return to “Tutorial Requests”