This topic has not yet been rated - Rate this topic

GoToCopySourceLink Class

Represents a link that redirects to the display form of the source item.
This class and its members are reserved for internal use and are not intended to be used in your code.

Namespace:  Microsoft.SharePoint.WebControls
Assembly:  Microsoft.SharePoint (in Microsoft.SharePoint.dll)
Available in Sandboxed Solutions: No
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level = AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level = AspNetHostingPermissionLevel.Minimal)]
public sealed class GoToCopySourceLink : FormComponent
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Did you find this helpful?
(1500 characters remaining)
Community Content Add
Annotations FAQ
GoToCopySourceLink
Description 

The Microsoft.SharePoint.WebControls.GoToCopySourceLink class inherits from the Microsoft.SharePoint.WebControls.FormComponent class which is the foundational control for form and field rendering controls. GoToCopySourceLink provides output of a HTML link with text "Go To Source Item" and a link pointing to a parameterized copyutil.aspx page. 

The GoToCopySourceLink control leverages a majority of its functionality from the use of the copyutil.aspx page. Copyutil.aspx is an application page that allows easy navigation to a source SPListItem in either edit or display mode by consuming a variety of ID’s. 

With GoToCopySourceLink the GoToDispForm is set to one so will be redirect to display mode and the ID to the item is provided by ListItem.CopySource.

Usage Scenario

The primary usage of GoToCopySourceLink is within the shipped software when you are managing copies. Within custom development, it is commonly found when developing applications that will heavily integrate item copying and will require integrated navigation to source items. 

Below, I am demonstrating creating a new GoToCopySourceLink object and setting the GoToCopySourceLink.Visible property to true. Following, the GoToCopySourceLink control is added to the current instance control collection.

C# Code Example

protected override void CreateChildControls()
{
GoToCopySourceLink link = new GoToCopySourceLink();
link.Visible = true;
Controls.Add(link);
}

Visual Basic .NET Code Example

Protected Overloads Overrides Sub CreateChildControls()
Dim link As New GoToCopySourceLink()
link.Visible = True
Controls.Add(link)
End Sub

Adam Buenz
SharePoint Foundation MVP - http://www.sharepointsecurity.com