Description
The ViewUrl
property provides the URL to the package's page for viewing or linking. This property is part of the Sandbox.Project
class and is used to access the web page associated with the project package, allowing users to view details or share the link.
Usage
To access the ViewUrl
property, you need to have an instance of the Sandbox.Project
class. This property is read-only and returns a string
representing the URL.
Note that this property is decorated with the JsonIgnoreAttribute
, which means it will not be serialized when using JSON serialization.
Example
// Assuming 'project' is an instance of Sandbox.Project
string viewUrl = project.ViewUrl;
// Use the URL to open in a web browser or display in the UI
// Example: Open the URL in the default web browser
System.Diagnostics.Process.Start(new System.Diagnostics.ProcessStartInfo
{
FileName = viewUrl,
UseShellExecute = true
});