http://www.google.com.au/search?q=word1+word2+word3
headkaze said:If you have a look at the url of a site like Google after a search you can see what variables are used to POST to their engine.
Eg. Typing "word1 word2 word3" into Google results in:
Code:http://www.google.com.au/search?q=word1+word2+word3
If you take this as a reference you can take your TextBox text and create a url for it.
Eg. string myURL = "http://www.google.com.au/search?q=" + String.Join('+', myTextBox.Text.Split(' '));
Then send myURL to your browser control and it should show google with the words from your TextBox.
headkaze said:If you have a look at the url of a site like Google after a search you can see what variables are used to POST to their engine.
Eg. Typing "word1 word2 word3" into Google results in:
Code:http://www.google.com.au/search?q=word1+word2+word3
If you take this as a reference you can take your TextBox text and create a url for it.
Eg. string myURL = "http://www.google.com.au/search?q=" + String.Join('+', myTextBox.Text.Split(' '));
Then send myURL to your browser control and it should show google with the words from your TextBox.
myTextBox.Text = "word1 word2 word3";
MessageBox.Show(String.Join("+", myTextBox.Text.Split(' ')));
headkaze said:All that hoohaa was just to split up the text in the TextBox into an array of words separated by a space, then bring them back together placing a "+" between them.
C#:myTextBox.Text = "word1 word2 word3"; MessageBox.Show(String.Join("+", myTextBox.Text.Split(' ')));
Will ouput "word1+word2+word3". The error you got was because I accidently used single quotes for a char in the Join method when it expects double quotes for a string.