Share via


WebSiteProperties Interface

The properties supported by a Web site project in Visual Studio.

Namespace:  VsWebSite
Assembly:  VsWebSite.Interop (in VsWebSite.Interop.dll)

Syntax

'Declaration
<GuidAttribute("477BFD8A-5FD5-434F-981B-2FD3C145B473")> _
Public Interface WebSiteProperties
'Usage
Dim instance As WebSiteProperties
[GuidAttribute("477BFD8A-5FD5-434F-981B-2FD3C145B473")]
public interface WebSiteProperties
[GuidAttribute(L"477BFD8A-5FD5-434F-981B-2FD3C145B473")]
public interface class WebSiteProperties
public interface WebSiteProperties

Remarks

The Visual Studio general automation model provides the Properties collection, which you can use to access the properties of any Visual Studio project type, including Web site projects.

Each property is available as an item in a project's Properties collection.

These properties cannot be accessed by directly casting a Properties object to a WebSiteProperties object. Instead, these properties are late-bound and must be accessed through the Properties collection by supplying the name of the property for the specific type of project.

In addition to the properties available with the Properties collection of a Project object, additional properties are available in the VSWebSite class when you cast a Project object to a VSWebSite object.

Examples

The following code example shows how to read the BrowseUrl property, which is a typical late-bound property:

Dim proj As EnvDTE.Project = DTE.Solution.Projects.Item(1)
Dim str As String = proj.Properties.Item("BrowseURL").Value

The following code example shows how to set the BrowseUrl property:

Dim proj As EnvDTE.Project = DTE.Solution.Projects.Item(1)
proj.Properties.Item("BrowseURL").Value = "http://newHost/newFile"

See Also

Reference

WebSiteProperties Members

VsWebSite Namespace

DTE

Project

Properties

Property

VSWebSite

Other Resources

Automation and Extensibility Reference

Referencing Automation Assemblies and the DTE2 Object

Visual Studio Macros

Creating Add-ins and Wizards