Posts Tagged ‘SharePoint

The features of MOSS 2007

2010年01月21日 星期四

Enterprise Portal

Web Form Web Part                                Use for Web Content of Type Display ( Web Form)

Web Report Web Part                              Use for Web Content of Type Output ( Report and Web Report)

Generic Web Part                                    Use for Web Let

Web Menu Web Part                                Use for Web Menu on top and left

Box Menu Web Part                                 Use for Web Menu on Activity Center Task List

Page Title Web Part                                 Use for Page Title leveraging AX Label

Windows SharePoint Services

Content Editor Web Part

Use for formatted text, tables, and images.

Form Web Part

Use to connect simple form controls to other Web Parts.

Image Web Part

Use to display pictures and photos.

Members

Use the Members Web Part to see a list of the site members and their online status.

Page Viewer Web Part

Use to display linked content, such as files, folders, or Web pages. The linked content is isolated from other content on the Web Part Page.

Relevant Documents

Use this webpart to display documents that are relevant to the current user.

User Tasks

Use this webpart to display tasks that are assigned to the current user.

XML Web Part

Use for XML, and XSL Transformation of the XML.

List View Web Part

Microsoft SharePoint Server 2007


Business Data

Business Data Actions

Display a list of actions from the Business Data Catalog.

Business Data Item

Display one item from a data source in the Business Data Catalog.

Business Data Item Builder

Creates a Business Data item from parameters in the query string and provides it to other web parts. This web part is only used on Business Data profile pages.

Business Data List

Display a list of items from a data source in the Business Data Catalog.

Business Data Related List

Display a list of items related to one or more parent items from a data source in the Business Data Catalog.

Content Rollup

Colleague Tracker

Displays your list of colleagues and any recent changes they made have had.

Memberships

Displays your site and distribution list memberships.

My Links

Use to display your links

My SharePoint Sites

Use to display documents authored by you on sites where you are a member and sites of your choice.

My Workspaces

Displays sites created under your My Site.

Site Aggregator

Use to display sites of your choice.

Dashboard

Key Performance Indicators

Shows a list of status indicators. Status indicators display important measures for your organization, and show how your organization is performing with respect to your goals.

KPI Details

Displays the details of a single status indicator. Status indicators display an important measure for an organization and may be obtained from other data sources including SharePoint lists, Excel workbooks, and SQL Server 2005 Analysis Services KPIs.

Other

Excel Web Access

Use the Excel Web Access to interact with an Excel 2007 workbook as a Web page.

I need to…

SharePoint FREE Training site: http://goo.gl/driC

2010年01月20日 星期三

Point8020 Learning Solutions from SharePoint: http://www.point8020.com/Training.aspx

Trying to report error to Sharepoint ToolPane

2010年01月14日 星期四

/// <summary>
/// A custom editor part for picking data fields for a table web part
/// </summary>
class CustomEditorPart:EditorPart
{
#region Declarations

// In addition to other controls, etc, declare an error variable

string _errorText = string.Empty;

#endregion Declarations

#region Apply Changes

/// <summary>
/// Applies the changes to the web part properties
/// </summary>
/// <returns></returns>
public override bool ApplyChanges()
{
try
{

// You code goes here

return true;
}
catch (Exception ex)
{
_errorText = ex.Message;
return false;
}
}

#endregion Apply Changes

#region Rendering (Error Text)

/// <summary>
/// Update the error text if needed
/// </summary>
/// <param name="e"></param>
protected override void OnPreRender(EventArgs e)
{
if (_errorText != string.Empty)
{
this.Zone.ErrorText += Environment.NewLine + _errorText;
}

base.OnPreRender(e);
}

#endregion Rendering (Error Text)
}

来源: http://goo.gl/IbOo

读取SharePoint的SMTP设置, 发送邮件

2009年09月17日 星期四

private static String GetSmtpHost()
{
SPOutboundMailServiceInstance instance = SPContext.Current.Site.WebApplication.OutboundMailServiceInstance;

if (instance != null)
{
return instance.Server.Address;
}

instance = SPAdministrationWebApplication.Local.OutboundMailServiceInstance;

if (instance != null)
{
return instance.Server.Address;
}

return String.Empty;
}

SmtpClient smtpClient = new SmtpClient(smtpServer);
MailMessage mail = new MailMessage(FromEmail, ToEMail)
{
Subject = MailSubject,
Body =

“<html><head><meta http-equiv=\”Content-Type\” content=\”text/html; charset=UTF-8\”><title>” + MailSubject + “</title></head>”
+ “<body style=\”font-family: Verdana; font-size: 12px\”>” + MailBody + “</body></html>”,
IsBodyHtml = true
};

smtpClient.Send(mail);

判断是否一个SharePoint Publishing页处于编辑模式

2009年09月16日 星期三

… 并且避免 ASP.NET 验证控件错误:

This page contains content or formatting that is not valid. You can find more information in the affected sections.

or

Input string was not in a correct format.

当创建一个WebPart来显示包含验证控件的表单时, ASP.NET 验证控件会阻止你签入和发布当前的Publishing页面.

解决方案:

  • Check if the web part is in edit or design mode and only add the validator if not:if (this.WebPartManager.DisplayMode != WebPartManager.EditDisplayMode &&
    this.WebPartManager.DisplayMode != WebPartManager.DesignDisplayMode)
    {
    // in display mode
    }

    This solution applies only if you have a single web part on the page, because you can only check if the current web part is in display/edit/design mode.

  • Another solution is using the EditModePanel. It allows you to add contols to the page in display or edit mode.
    For example:

    // add the EditBox to the page in edit mode
    EditModePanelpanel = newEditModePanel();
    TextBoxtextBox = newTextBox();

    panel.Controls.Add(textBox);
    panel.PageDisplayMode = PageDisplayMode.Edit;
    this.Controls.Add(panel);

    This solution didn’t work. Some replection shows me that the panel uses this function (which is obfuscated): public staticSPControlModeGetContextualFormModeFromPostedForm()
    This function comes from the internal class ConsoleUtilities.

  • The solution that worked for me was quite simple:

    // check if the form is in display mode
    bool inDisplayMode = SPContext.Current.FormContext.FormMode == SPControlMode.Display;

Well, good luck ;)

来源: http://blogs.microsoft.co.il/blogs/justguy/archive/2008/08/13/checking-if-a-publishing-page-is-in-edit-mode.aspx

How to get SharePoint 2007 SPList Forms Url

2009年09月11日 星期五

String formUrl = String.Format(CultureInfo.InvariantCulture, "{0}/{1}?id={2}",
SPContext.Current.Web.Url,
SPContext.Current.Web.Lists[ListName].Forms[ PAGETYPE.PAGE_DISPLAYFORM].Url, item.Id);

来源: http://www.myrocode.com/post/2009/03/20/How-get-SharePoint-2007-SpListItem-DispForm-Url.aspx