Skip to content

Instantly share code, notes, and snippets.

@chrisobriensp
Created December 24, 2012 20:33
Show Gist options
  • Save chrisobriensp/4370608 to your computer and use it in GitHub Desktop.
Save chrisobriensp/4370608 to your computer and use it in GitHub Desktop.
Using SP2013 search REST API from provider-hosted/auto-hosted app
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="SearchResults.aspx.cs" Inherits="COB.SharePointAutohostedAppWeb.Pages.SearchResults" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Using SP2013 search REST API from provider-hosted/auto-hosted app</title>
</head>
<body>
<form id="form1" runat="server">
<h1>Search results</h1>
<div>
<asp:listview runat="server" ID="lvSearchResults">
<ItemTemplate>
<div class="item">
<div class="title">
<a href="<%# Eval("Path") %>"><%# Eval("Title") %></a> (<%# Eval("Author") %>)
</div>
<div class="summary">
<%# Eval("HitHighlightedSummary") %>
</div>
</div>
</ItemTemplate>
</asp:listview>
</div>
</form>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment