Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • newbie 13 posts 33 karma points
    Mar 11, 2012 @ 23:39
    newbie
    0

    Using Examine to Search Content

    Hi,

    I am trying to implement search feature using examine. Ive followed the steps which are suggested in the Umbraco User Guide Book. 

    Ive copied all of the coding correctly and all of the different field names match the ones which i am using. However i have encountered a problem when adding a seach field.

    The complication error which i am encountering is this: 

     

    Compilation Error

    Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. 

    Compiler Error Message: CS1061: 'ASP.masterpages_master_master' does not contain a definition for 'runSearch' and no extension method 'runSearch' accepting a first argument of type 'ASP.masterpages_master_master' could be found (are you missing a using directive or an assembly reference?)

    Source Error:

    Line 126:        <asp:Label ID="labSearch"  runat="server" AssociatedControlID="txtSearch" Text="Search"></asp:Label>
    Line 127:        <asp:TextBox ID="txtSearch" name ="search" Text="" runat="server"></asp:TextBox>
    Line 128:         <asp:ImageButton ID="butSearch" ImageUrl="../images/search.gif" runat="server" AlternateText="Go" Value ="Search" onclick ="runSearch()"  />
    Line 129:       <script type ="text/javascript">
    Line 130:         function runSearch(){


    Source File: c:\Users\Podie\Documents\My Web Sites\Tutorials\masterpages\Master.master    Line: 128 

     

    This is the code: 

     <id="search">
            <asp:Label ID="labSearch"  runat="server" AssociatedControlID="txtSearch" Text="Search"></asp:Label>
            <asp:TextBox ID="txtSearch" name ="search" Text="" runat="server"></asp:TextBox>
             <asp:ImageButton ID="butSearch" ImageUrl="../images/search.gif" runat="server" AlternateText="Go" Value ="Search" onclick ="runSearch()"  />
           <script type ="text/javascript">
             function runSearch(){
             var searchResultsUrl "/search.aspx";
             document.location.href =searchResultsUrl "?s=" document.getElementById("txtSearch");
               }
           </script>
          </p>

     

    Any ideas on what i am doing wrong? 

    Thanks

    /newbie

Please Sign in or register to post replies

Write your reply to:

Draft