locked
How to add custom controls like save button to sharepoint 2013 search results RRS feed

  • Question

  • Hi

             I am trying to add asp.net button to the sharepoint search results and is there any best possible is there to add save button to the search results so that data will be saved to another list.

    Thanks


    Razvi444

    Tuesday, November 12, 2013 3:13 PM

Answers

  • Hi Razvi444,

    According to your post, my understanding is that you wanted to add a Save button to the search results.

    If you look at the URL that was returned for the Results page, you will notice something like this: (".../Results.aspx?k=workflow").

    SharePoint takes our keyword(s) and posts them to the Results page using the QueryString variable called "k=", filling in that pages search textbox with our original query for consistency.

    Since SharePoint Search is URL-driven, meaning that whatever is after that QueryString variable are the results returned from the index, all we have to do is save that URL to a Custom List for easy access and post it for the user when they want to re-run the search.

    Therefore, we can use the JavaScript/JQuery to achieve it,Craig Pilkenton had written a good blog about it , you can have a look at it.

    https://www.nothingbutsharepoint.com/sites/eusp/Pages/Create-a-Save-My-Searches-Feature-in-SharePoint-2010-with-JavaScript-jQuery.aspx

    Thanks & Regards,

    Jason

    Jason Guo
    TechNet Community Support

    • Marked as answer by Lindali Friday, November 22, 2013 9:44 AM
    Wednesday, November 13, 2013 8:00 AM

All replies

  • Nope as far as i know.

    The results that we are getting are in XSLT, i think there is no way you could write code that copies all that data into SharePoint list by click of a button.

    I would be interested if there is any thing like that...!

    Tuesday, November 12, 2013 4:24 PM
  • Hi Razvi444,

    According to your post, my understanding is that you wanted to add a Save button to the search results.

    If you look at the URL that was returned for the Results page, you will notice something like this: (".../Results.aspx?k=workflow").

    SharePoint takes our keyword(s) and posts them to the Results page using the QueryString variable called "k=", filling in that pages search textbox with our original query for consistency.

    Since SharePoint Search is URL-driven, meaning that whatever is after that QueryString variable are the results returned from the index, all we have to do is save that URL to a Custom List for easy access and post it for the user when they want to re-run the search.

    Therefore, we can use the JavaScript/JQuery to achieve it,Craig Pilkenton had written a good blog about it , you can have a look at it.

    https://www.nothingbutsharepoint.com/sites/eusp/Pages/Create-a-Save-My-Searches-Feature-in-SharePoint-2010-with-JavaScript-jQuery.aspx

    Thanks & Regards,

    Jason

    Jason Guo
    TechNet Community Support

    • Marked as answer by Lindali Friday, November 22, 2013 9:44 AM
    Wednesday, November 13, 2013 8:00 AM