Google search

  • Thread starter Thread starter Peter Morris [Droopy eyes software]
  • Start date Start date
P

Peter Morris [Droopy eyes software]

Hi all

I want to put a google search on my website. My options are

1) Create a new <form> outside of my aspx form.

Problem: I have a HeaderControl and FooterControl on each page to give my
site a uniformed look. Placing it outside of the <form> would mean it would
have to come after the FooterControl which, as you can probably guess, would
make everything look wrong.


2) Use an ASP:TextBox and ASP:Button, and do a Response.Redirect from the
code behind.

Problem: Web users are used to typing in their query and then hitting enter.
On this WebForm there is another button which appears earlier on the page.
Hitting enter causes this button to be clicked and not my Search button.

Any suggestions?


--
Pete
====
ECO Modeler, Audio compression components, DIB graphics controls,
FastStrings
http://www.droopyeyes.com

Read or write articles on just about anything
http://www.HowToDoThings.com

My blog
http://blogs.slcdug.org/petermorris/
 
2) Use an ASP:TextBox and ASP:Button, and do a Response.Redirect from the
code behind.

Problem: Web users are used to typing in their query and then hitting enter.
On this WebForm there is another button which appears earlier on the page.
Hitting enter causes this button to be clicked and not my Search button.

See http://www.metabuilders.com/Tools/DefaultButtons.aspx for a solution to
the Enter key behavior.

Also don't forget the third option, which is Google's Web Services API;

http://www.google.com/apis/

And the fourth option;

+ Make the textbox a standard HTML control, no runat=server
+ Bind your Search button to a javascript routine that just opens a new
window, with the Google search results.

You could do that either by just formatting a Google URL with the result in
it, or you could build a custom Googlequery .aspx page that take a param and
does a nicely formatted result.

/// M
 
Back
Top