Back to Devexpress

UploadControlOneDriveSettings Class

aspnet-devexpress-dot-web-be6e75bc.md

latest3.5 KB
Original Source

UploadControlOneDriveSettings Class

Contains settings that allow you to connect the Upload Control to OneDrive.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
public class UploadControlOneDriveSettings :
    UploadControlUploadStorageSettingsBase
vb
Public Class UploadControlOneDriveSettings
    Inherits UploadControlUploadStorageSettingsBase

The following members return UploadControlOneDriveSettings objects:

LibraryRelated API Members
ASP.NET Web Forms ControlsASPxUploadControl.OneDriveSettings
ASP.NET MVC ExtensionsUploadControlBinderSettings.OneDriveSettings
UploadControlSettings.OneDriveSettings

Remarks

Follow the steps below to connect the Upload Control to OneDrive:

  1. Call the RegisterOneDrive method in the Global.asax file.
  2. Set the Upload Control’s UploadStorage property to OneDrive.
  3. Assign a OneDrive account’s name to the OneDriveSettings.AccountName property.

The following example demonstrates how to connect the Upload Control to OneDrive:

cs
void Application_Start(object sender, EventArgs e) {
   DevExpress.Web.AccountManager.RegisterOneDrive("YourOneDriveAccount", "YourClientId", "YourClientSecret");
}
aspx
<dx:ASPxUploadControl ID="UploadControl" runat="server" UploadStorage="OneDrive" ShowUploadButton="True" >
    <OneDriveSettings AccountName="YourOneDriveAccount" 
                      TokenEndpoint="YourTokenEndpoint" 
                      RedirectUri="YourRedirectUri" />
</dx:ASPxUploadControl>

Once the Upload Control uploads a file to cloud storage, you can use the key name of this file to access it. To obtain a file key name, use the FileNameInStorage property of an UploadedFile object.

Implements

IStateManager

IPropertiesOwner

Inheritance

Object StateManager PropertiesBase UploadControlUploadStorageSettingsBase UploadControlOneDriveSettings UploadControlOneDrivePersonalSettings

See Also

Cloud Storage Account Management

UploadControlOneDriveSettings Members

DevExpress.Web Namespace