Posts

Showing posts from April, 2013

Create and deploy HTTPModule in SharePoint 2010

1. Create a class library 2. Add below code in the cs file using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Web; using System.Web.UI; using Microsoft.SharePoint; using System.Configuration; using Microsoft.SharePoint.ApplicationRuntime; namespace DynamicModule {     public class DynamicModule : IHttpModule     {         public void Init(HttpApplication context)         {             context.PreRequestHandlerExecute += new EventHandler(context_PreRequestHandlerExecute);         }         void context_PreRequestHandlerExecute(object sender, EventArgs e)         {             Page page = HttpContext.Current.CurrentHandler as Pa...

SharePoint search with jQuery

The data in Sharepoint can be searched using Search.asmx web service. This code just needs a CEWP to search the data using jQuery. Add a Content Editor Web Part to your page. Add the below code to your Content Editor Web Part Enter any keyword to search the data Please make sure that the data in SharePoint is crawled to search the content. <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js"></script> <script type="text/javascript"> // *** Customizable parameters *** var quickSearchConfig = { delay: 500, // time to wait before executing the query (in ms) minCharacters: 3, // minimum nr of characters to enter before search scope: "All Sites", // search scope to use numberOfResults: 75, // number of results to show resultsAnimation: 200, // animation time (in ms) of the search results resultAnimation: 0 // animation time (in ms) of individual result (when selected) }; </s...