Make Google Searchbox code compatible with ASP.NET WebForms -


i provided following code integrate asp.net webforms page:

<form action="http://www.google.com/cse" id="cse-search-box" target="_blank">   <div>     <input type="hidden" name="cx" value="partner-pub-8127518365728966:9snx3s9v6fx" />     <input type="hidden" name="ie" value="iso-8859-1" />     <input type="text" name="q" size="25" /><br />     <input type="submit" name="sa" value="search" class="formoutput"/>   </div> </form> <script type="text/javascript" src="http://www.google.com/cse/brand?form=cse-search-box&amp;lang=en"></script> 

however, i'm not sure how because of form element poses. has translated work asp.net webforms previously, , if can me out?

thanks!

take here: http://am22tech.com/s/22/blogs/post/2010/05/26/how-can-i-add-google-search-box-to-my-website-on-master-page-with-aspnet.aspx

it's bit of hack idea following:

  1. place search box in separate html page
  2. modify target , action properties of form
  3. add iframe main page source of above html page

the article pretty detailed and, if don't mind using iframe, should answer question.

update

scott mitchell has posted detailed article not use iframes. looks more work implement may better choice.

url: http://dotnetslackers.com/articles/aspnet/implementing-search-in-asp-net-with-google-custom-search.aspx


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -