SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I previously developed a Visual web part to programmatic-ally create Search alerts based on the user input. I used a text box to capture the text and create a Query using the Keyword Query Class. Then I used a constructor provided through the DLL/API, (THIS WAS IN SHAREPOINT 2010)

SearchAlert NewSearchAlert = new SearchAlert(SPSite xxx, Query xxxx )

This constructor was avilable in Sharepoint 2010 and Sharepoint 2013 Preview. But i cant not find this condtructor in Sharepoint 2013.

The available constructor in Sharepoint 2013 is

SearchAlert NewSearchAlert = new SearchAlert(SPAlertCollection xxx, SpAlert xxxx )

Is there someone who has worked with this class to tell me where i can find the Initial constructor where i pass the query and build the search alert or is there anyone who knows how to set the query text in an SPAlert and create a search alert using the new constructor?

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.