Monday, September 14, 2015

Sunny

using System; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using Microsoft.SharePoint; using System.Data; namespace VisualWebPartProject1.VisualWebPart1 { public partial class VisualWebPart1UserControl : UserControl { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { try { SPSite objSite = new SPSite("http://intranet.contoso.com"); SPWeb objWeb = objSite.OpenWeb(); SPList objList = objWeb.Lists["Employee"]; //DataTable dt = new DataTable(); //dt.Columns.Add("Name"); //dt.Columns.Add("Email ID"); //dt = objList.Items.GetDataTable(); this.GridView1.DataSource = objList.Items.GetDataTable(); this.GridView1.DataBind(); //get the emaployee id 1 and show in the text box SPListItem objItem = objList.GetItemById(1); this.txtName.Text = objItem["Title"].ToString(); this.txtEmilID.Text = objItem["Email ID"].ToString(); } catch (Exception ex) { this.Label1.Text = ex.Message; } } } protected void btnTest_Click(object sender, EventArgs e) { SPSite objSite = new SPSite("http://intranet.contoso.com"); SPWeb objWeb = objSite.OpenWeb(); SPList objList = objWeb.Lists["Employee"]; //get the emaployee id 1 and show in the text box SPListItem objItem = objList.GetItemById(1); objItem["Email ID"] = this.txtEmilID.Text; objItem.Update(); } } } ------------------------------------------------------------------- <%@ Assembly Name="$SharePoint.Project.AssemblyFullName$" %> <%@ Assembly Name="Microsoft.Web.CommandUI, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="Utilities" Namespace="Microsoft.SharePoint.Utilities" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Register Tagprefix="asp" Namespace="System.Web.UI" Assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" %> <%@ Import Namespace="Microsoft.SharePoint" %> <%@ Register Tagprefix="WebPartPages" Namespace="Microsoft.SharePoint.WebPartPages" Assembly="Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %> <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="VisualWebPart1UserControl.ascx.cs" Inherits="VisualWebPartProject1.VisualWebPart1.VisualWebPart1UserControl" %>
Name
Email ID

All The Employee

Tuesday, August 18, 2015

SharePoint 2007 Search Error: The gatherer is shutting down

Please verify the servers where Office Server Search service is possibly in hang status.(stopping mode)

1.    Check your topology from Central Administration – > Servers in Farm section and define which SharePoint servers responsible for running search.

2.    Connect to all those machines, open services.msc, and check status of Office Server Search Service.

3.    If you find the service in "stopping" state, then open task manager,  Kill the mssearch.exe process. After killing this process your Office Server Search service should go to "stop" state.

4.    Now restart the same service and check if the problem persists. If it does not, then the issue is fixed.

If that does not help, you may need to restart the server to fix the issue.