Welcome to MSDN Blogs Sign in | Join | Help

Dr. Z's Blog

Dr. "Z" lives in Northern Virginia with his family. He tries to stay in touch with developers and architects in the Mid-Atlantic region.
Adding Microsoft Bing to your Web Site

TechFlash reports that Washington state goes with Bing. You can test how the Bing search engine works at the official website.

If you are interested to add Bing search box to your own web site, it is rather easy to do so. The detailed instructions are provided at http://www.bing.com/siteowner.

Add a basic search box to search the Web from your website

For a list of code-page values for all languages, see the Code Pages Supported by Windows webpage.

To let your visitors search the Web from your website, add the following code to your webpage:

<!-- Web search from Bing-->
<form method="get" action="http://www.bing.com/search">
<input type="hidden" name="cp" value="1252" />
<input type="hidden" name="FORM" value="FREEWS" />
  <table bgcolor="#FFFFFF">
    <tr>
      <td>
        <a href="http://www.bing.com/">
          <img src="http://www.bing.com/siteowner/s/siteowner/Logo_51x19_Dark.png" border="0" ALT="bing" />
        </a>
      </td>
      <td>
        <input type="text" name="q" size="30" />
        <input type="submit" value="Search Web" />
      </td>
    </tr>
  </table>
</form>
<!-- Web Search from Bing -->

Add a basic search box to search just your website

Note: You need to replace the domain name "xyzdomain.com" with your own domain. Do not include prefix "www".

<!-- Site search from Bing-->
<form method="get" action="http://www.bing.com/search">
<input type="hidden" name="cp" value="1252" />
<input type="hidden" name="FORM" value="FREESS" />
  <table bgcolor="#FFFFFF">
    <tr>
      <td>
        <a href="http://www.bing.com/">
          <img src="http://www.bing.com/siteowner/s/siteowner/Logo_51x19_Dark.png" border="0" ALT="Bing" />
          </a>
      </td>
      <td>
        <input type="text" name="q" size="30" />
        <input type="submit" value="Search Site" />
        <input type="hidden" name="q1" value="site:xyzdomain.com" />
      </td>
    </tr>
  </table>
</form>
<!-- Site Search from Bing -->

Posted: Friday, July 31, 2009 11:53 AM by zxue

Comments

No Comments

Anonymous comments are disabled
Page view tracker