[Help] Google search a textbox value [solved]

Posts 1–11 of 11 · Page 1 of 1
[Help] Google search a textbox value [solved]
ok i dont really know how to explain it but this is wat i want but i need help with it

i want where if i type in the textbox i can make whatever i type search google

Example

Apples <<< that would be the textbox xD
[Google] <<< that would be the button xD

hope u get what im saying thanks
u wanna type into the text boxe and make it search on google?
yea xD
/short
[highlight=vb.net]Process.Start("http://www.google.com/search?btnG=1&pws=0&q=" & TextBox1.Text)[/highlight]
Quote Originally Posted by master131 View Post
[highlight=vb.net]Process.Start("http://www.google.com/search?btnG=1&pws=0&q=" & TextBox1.Text)[/highlight]
thanks bro i had every thing right but this search?btnG=1&pws=0&q= thnks / close
Quote Originally Posted by pushdis15 View Post


thnks / close
dont say it .. Press it !
Quote Originally Posted by SoWhat View Post
dont say it .. Press it !
i repped him dont worry an u
Well you can just use:
[highlight=vb.net]Process.Start("http://www.google.com/search?q=" & TextBox1.Text)[/highlight]
Thread marked solved.
Just a note - don't forgot to URL encode your input, otherwise spaces, and symbols may potentially screw with your query, like "Why are freedompeace & Mr. X so pro & awesome?", generating
Code:
http://www.google.com/search?q=Why are freedompeace & Mr. X so pro & awesome?
Go on, try that right now in your browser. Note that some browsers will automatically escape the spaces (" ") into %20 for you, like Chrome.

So, the correct method would be to use:
Code:
Process.Start("http://www.google.com/search?q=" & HttpUtility.UrlEncode(TextBox1.Text))
Quote Originally Posted by freedompeace View Post
Just a note - don't forgot to URL encode your input, otherwise spaces, and symbols may potentially screw with your query, like "Why are freedompeace & Mr. X so pro & awesome?", generating
Code:
http://www.google.com/search?q=Why are freedompeace & Mr. X so pro & awesome?
Go on, try that right now in your browser. Note that some browsers will automatically escape the spaces (" ") into %20 for you, like Chrome.

So, the correct method would be to use:
Code:
Process.Start("http://www.google.com/search?q=" & HttpUtility.UrlEncode(TextBox1.Text))
Just thought I'd clarify, HttpUtility is found in the System.Web namespace and though it appears to be referenced by default, to actually unleash this badboy, manually reference it so that you can access all the classes and methods.
Posts 1–11 of 11 · Page 1 of 1
This thread is closed for replies.

Tags for this Thread

None

Talk with us