Results 1 to 6 of 6

Thread: Add Live Search on website with ASP.NET

  1. #1
    Join Date
    Jan 2011
    Posts
    27

    Add Live Search on website with ASP.NET

    I am developing one website where I want to add a search bar that can be very much effective and it would be always better if your website has Live Search bar. I know that it is possible but I am not aware that how can I have it programmatically. It would be even real web service so that people would be happy while using it on my website. Can anybody help me? I am using an ASP.Net for developing my website.

  2. #2
    Join Date
    Apr 2009
    Posts
    569

    Re: Add Live Search on website with ASP.NET

    Many service providers offer the functionality of its services through specific API, any developer can use in their applications using the service. This trend is facilitated greatly by the use of Web services, but are also very popular downloads real libraries that can be used for Web applications and Desktop. Microsoft also offers a set of tools, services, APIs and documentation that allows us to use a good chunk of the Windows Live family of services. You can download the SDK for the use of services such as Windows Live ID, Photos, Virtual Earth, Agents.

  3. #3
    Join Date
    May 2009
    Posts
    511

    Re: Add Live Search on website with ASP.NET

    As for the search service, in addition to the specific APIs that we will see, we can use a pre-packaged component to be inserted without too much effort into our Web pages. On the main page of the Windows Live search API we find the "get your search box now", under "Ajax Control. Following the link we are asked to choose between the search box of basic and advanced.

  4. #4
    Join Date
    May 2009
    Posts
    529

    Re: Add Live Search on website with ASP.NET

    The choice is made, there comes the HTML code to copy and paste into our site. The only precaution to be taken before using the search box, is to insert the code of the character set in a hidden field. This code can be chosen from this list . Example we are using the code 1250 (Central Europe).

    Searching the Web by Live Search
    Code:
     <form METHOD="GET" action="http://search.live.com/results.aspx"> 
       <input type="hidden" name="cp" value="1250"/> 
       <input type="hidden" name="FORM" value="FREEWS"/>
       <a href="http://search.live.com/">
         <img src="http://search.live.com/s/affillogoLive.gif" style="border:none" alt="Live Search"/>
       </ A>
       <input type="text" name="q" size="30" />
       <input type="submit" value="Search Web"/>         
     </ Form>
    In this way, we can add search capabilities to our site quickly and painlessly. In addition to this basic functionality, the Live Search service provides developers with a real Web Service, with supporting documentation, you can rely on for our research.

  5. #5
    Join Date
    May 2009
    Posts
    539

    Re: Add Live Search on website with ASP.NET

    But with http:// search.live.com/ I have vainly sought a so pages. Certainly, there are the most diverse gadget options to involve the search, but I want it simply as a search box with me in the side include yes. Only the style sheet alone could be together yourself and save locally on his Space. The section in the last third of the CSS is important - where to start the search styles.
    modest just say proposed changes is only a first quick attempt.

  6. #6
    Join Date
    Apr 2009
    Posts
    488

    Re: Add Live Search on website with ASP.NET

    Here I have provided the code which you can use to add up the live search bar to your website made with the asp code lines.
    Code:
     DOCTYPE HTML PUBLIC "- / / W3C / / DTD HTML 4.01 Transitional / / EN"> 
     <html> 
     <head> 
    <title> </ title> 
    <link rel= "stylesheet" type= "text/css" media= "screen" href= "http://www.live.com/live/1.100.7.337/css/searchlanding.css" /> 
    </ head> 
    <body> 
    <div "search"> id= 
    <ul> 
    <li> 
    <a href= "http://www.live.com/?searchLive Searchonly=true" target= "_blank"> 
    <img src = "http://shared.live.com/ live.themes /~/~/~ live.search ~ / ~ / ~ de-DE/Base/controls/img/jewel.png" alt = "Live.com search" width = "49" height = "49" border = "0" align = "absmiddle"> </ a> <span id= "searchLandingTitle"> Live Search </ span> 
      > "details": <ul Class = 16 
      <li> 
      <div "searchBar"> id= 
      <form id= "searchform" name= "searchform" action= "http://search.live.com/results.aspx" target= "_blank" onsubmit= "return onSearch(event);"> 
    <span "sc" class => class = <input "q" id= "q" name= "q" value = "" /> <input style = "border: 1px solid rgb (170, 170, 170) , "name =" mkt "value =" en-us "type =" hidden "/> <input name= "FORM" value = "LVSP" type= "hidden" /> <input name =" go "id =" go "class =" go "src =" http://www.live.com/live/1.100.7.337/img/search_go.gif "target =" _blank "value =" Search "align =" middle "type =" image "/> </ span> </ form> 
    </ div> 
    <script> document.getElementById ("q")>. Focus ();</ script 
    </ li> 
    <li> 
      > "scopes": <ul Id= "scopes" class = 25 
    <li class = "selected" id= "web"> 
     <a href= "./?scope=web" onclick= "return selectScope('web');"> Web </ a> </ li> 
    <li "images"> id= 
    <a href= "./?scope=images" onclick= "return selectScope('images');"> 
    Photos </ a> </ li> 
    <li "news"> id= 
    <a href= "./?scope=news" onclick= "return selectScope('news');"> News </ a> </ li> 
    <li "local"> id= 
    <a href= "./?scope=local" onclick= "return selectScope('local');"> Local </ a> </ li> 
    <li "qna"> id= 
    <a href= "./?scope=qna" onclick= "return selectScope('qna');"> QNA </ a> </ li> 
    </ ul> 
    </ li> 
    </ ul> 
    </ li> 
    <li "msg" class => </ li> 
    </ ul> 
    </ div> 
    <script "JavaScript"> language= 
    var searchform = document.getElementById ("searchform"); 
    var searchbox = document.getElementById ("q"); 
    _scope var = "web"; 
    var _scopes = {web: 'http://search.live.com/results.aspx' news: 'http://search.live.com/news/results.aspx' images: 'http:/ / search.live.com / images / results.aspx 'local:' http://local.live.com/ 'QnA' http://qna.live.com/search.aspx '}; 
    onSearch function (ev) 
    { 
    searchform.action = _scopes [_scope]; 
    return true; 
    } 
    var scopesEl = document.getElementById ("scopes"); 
    function select scope (scope) 
    { 
     _scope scope =; 
    if (scopesEl) for (var i = 0; i <scopesEl.childNodes.length; i + +) scopesEl.childNodes [i];. ClassName = "" 
    var el = document.getElementById (scope); 
    if (null = el) el.className = "selected"; 
    searchbox.focus (); 
    return false; 
    } 
    </ script> 
    </ body> 
    </ html>

Similar Threads

  1. Adding search function to Website
    By Gannon in forum Software Development
    Replies: 5
    Last Post: 18-12-2009, 10:44 PM
  2. my website is not showing in googles search
    By Shashee in forum Technology & Internet
    Replies: 3
    Last Post: 29-06-2009, 06:38 PM
  3. How do i search MP4 tracks using Google website
    By AK_Chopra in forum Technology & Internet
    Replies: 2
    Last Post: 23-05-2009, 09:28 AM
  4. How to add your website to google search?
    By SmirnOFF in forum Tips & Tweaks
    Replies: 5
    Last Post: 19-03-2009, 12:34 PM
  5. Unblock a Website using Google Search Engine
    By Computer_Freak in forum Tips & Tweaks
    Replies: 1
    Last Post: 21-02-2009, 11:28 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,485,421.76977 seconds with 17 queries