Table of Contents

Class FileViewModel

Namespace
Dynamicweb.Frontend
Assembly
Dynamicweb.dll

FileViewModel represents the rendering context used when a file is rendered.

public class FileViewModel : ViewModelBase
Inheritance
FileViewModel
Derived
Inherited Members

Constructors

FileViewModel()

Initializes a new instance of the FileViewModel class.

public FileViewModel()

Properties

Extension

Gets or sets the extension.

public string Extension { get; set; }

Property Value

string

The extension e.g. .jpg

IsImage

Checks if the type is of ImageFileViewModel and returns the boolean corresponding to the result of this check.

public bool IsImage { get; }

Property Value

bool

Returns true if the this is an ImageFileViewModel and false if it is not.

Name

Gets or sets the name.

public string Name { get; set; }

Property Value

string

The name of the file e.g. "File1"

Path

Gets or sets the path.

public string Path { get; set; }

Property Value

string

The path of the file.

PathUrlEncoded

Gets the path to the file in url encoded format for use in Urls.

public string PathUrlEncoded { get; }

Property Value

string

The url encoded path e.g. GetImage.ashx.

Methods

ToString()

Returns the path.

public override string ToString()

Returns

string

Returns the value of Path.

See Also

To top