ComponentOne ToolBar for ASP.NET AJAX: Adding and Uploading Files > Assigning Physical or Virtual Paths

Assigning Physical or Virtual Paths

If you are assigning an existing virtual path to the TargetFolder property use the ASP.NET Web application root operator (~) followed by a forward slash (/) like the following:

TargetFolder=”~/Target”

The ~ represents the web application’s physical path. That is, if the Web site is rooted at the physical path C:\WebSites\Upload\, ~/Target would be equivalent to C:\WebSites\Upload\Target. The uploaded file is placed in the Target folder 

If you are assigning an existing physical path to the TargetPhysicalFolder property use the full physical path. The backslash character (\) is used when assigning the physical path. For example if you created a folder on your C drive called:

C:\UploadFolder\Target

You would assign the full path to the TargetPhysicalFolder property like the following:

TargetPhysicalFolder=”C:\UploadFolder\Target”

Note: If you have both the TargetPhysicalFolder property and the TargetFolder property set, C1Upload will get the value assigned to the TargetPhysicalFolder property since it takes precedence over the TargetFolder property.


Send comments about this topic to ComponentOne.
Copyright © 1987-2010 ComponentOne LLC. All rights reserved.