Google search

  • Thread starter Peter Morris [Droopy eyes software]
  • 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/
 
M

MWells

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top