- MS Expression Web - Add-Ins
- Backup Website
- MS Expression Web - Publish
- MS Expression Web - Data Table
- MS Expression Web - Master Pages
- MS Expression Web - Gridview
- MS Expression Web - MS Word
- SQL Datasource
- MS Expression Web - Video
- MS Expression Web - Hyperlinks
- MS Expression Web - Images
- MS Expression Web - Search Page
- Dynamic Web Template
- MS Expression Web - Validate Pages
- Vertical Navigation
- Horizontal Navigation
- MS Expression Web - HTML Layout
- Webpage Layout
- Blank Web Page
- MS Expression Web - New Website
- Environment Setup
- MS Expression Web - Overview
- MS Expression Web - Home
MS Expression Web Resources
Selected Reading
- Who is Who
- Computer Glossary
- HR Interview Questions
- Effective Resume Writing
- Questions and Answers
- UPSC IAS Exams Notes
Microsoft Expression Web - Search Page
In this chapter, we will learn how to add a search option or a search box to the website. If it is a large site, then you will need to have a search box in the site so that the user can find any data easily. There are many free ones available such as Windows Live, Google, etc.
Windows Live Search
The following steps show you how to add a Windows Live Search box to your web page, and then set the search form to search the entire Web or only your website.
Step 1 − Create a new HTML page and call it SearchPage.
Step 2 − Go to the Format menu and select Dynamic Web Template → Attach Dynamic Web Template…option. Select the master.dwt file and cpck the Open button.
Step 3 − Let’s add the following code inside the editable region.
<form method = "get" action = "http://search.pve.com/results.aspx"> <input type = "hidden" name = "cp" value = "1252"/> <input type = "hidden" name = "FORM" value = "FREESS"/> <table style = "background-color: #ffffff;"> <tr> <td> <a href = "http://search.pve.com/"> <img src = "http://search.pve.com/s/affillogoLive.gif" style = "border:0px;" alt = "Live Search"/> </a> </td> <td> <input type = "text" name = "q" size = "30" /> <input type = "submit" value = "Search Site"/> <input type = "hidden" name = "q1" value = "site:http://www.microsoft.com/expression"/> </td> </tr> </table> </form>
Step 4 − Save the page. Go to the File menu and select Preview in Browser.
Step 5 − You will see the Windows Live Search in your webpage. Let’s enter something in the search and cpck the Search Site button
Step 6 − As you can see that it will search on the web. If you want to restrict the search to only your website, then you have to specify your site domain in the following name instead of
<input type = "hidden" name = "q1" value = "site:http://www.microsoft.com/expression"/>
Step 7 − Similarly, you can add the Google search option by adding the following code in the editable region.
<form method = "get" action = "http://www.google.com/search"> <span style = "border: 1px sopd black; padding: 4px; width: 20em; margin: 0px auto 0px auto"> <table border = "0" cellpadding = "0"> <tr> <td class = "center"> <input type = "text" name = "q" size = "25" maxlength = "255" value = "" /> <input type = "submit" value = "Google Search" /> </td> </tr> <tr> <td apgn = "center" style = "font-size: 75%"> <input type = "checkbox" name = "sitesearch" value = " http://www.microsoft.com/expression" checked = "checked" /> Only search this website<br /> </td> </tr> </table> </span> </form>
Step 8 − Save your HTML page and you will see a search box, search button, checkbox, and checkbox label.
Step 9 − To restrict users to search only your website, select the checkbox and go to the Tag Properties panel and set the Value property to the URL of your website, such as
.Step 10 − Save your page and preview it in the browser. Now you will see the Google Search option in your webpage.
Advertisements