UrlTask Constructor (String, Uri)
Initializes a new instance of the UrlTask class with the specified display name and the specified URL.
Namespace: Microsoft.WindowsServerSolutions.Administration.ObjectModel
Assembly: Microsoft.WindowsServerSolutions.Administration.ObjectModel (in Microsoft.WindowsServerSolutions.Administration.ObjectModel.dll)
Syntax
public UrlTask(
string displayName,
Uri url
)
public:
UrlTask(
String^ displayName,
Uri^ url
)
Public Sub New (
displayName As String,
url As Uri
)
Parameters
displayName
Type: System.StringThe name that is displayed for the task.
url
Type: System.UriA URL that is accessed in the Web browser.
Exceptions
Exception | Condition |
---|---|
ArgumentException | displayName or url is not valid. |
ArgumentNullException | displayName or url is null. |
Remarks
After a task has been initialized, it must be added to a TaskCollection to be included in the task pane of the Dashboard.
Examples
The following code example shows how to initialize a UrlTask that is accessed from the task pane of the Dashboard:
UrlTask siteTask = new UrlTask("Contoso Site", new Uri(@"https://www.contoso.com"));
See Also
UrlTask Overload
UrlTask Class
Microsoft.WindowsServerSolutions.Administration.ObjectModel Namespace
Return to top