Gets or sets the folder that contains images for the control.
[Visual Basic]
Public Property ImageBaseDirectory As
String
[C#]
public
String ImageBaseDirectory {get; set;}
Property Value
String
The folder that contains images for the control. The default value is null (Nothing in Visual Basic).
This property is read/write.
Remarks
If all images used by the control are in one folder, you can use this property to specify the folder, then only provide the file name for the specific image URL property. At run time, value of this property is combined with the actual URL property.
Note ImageBaseDirectory must start with "~\" or "~/", or an exception will be thrown.
Tip:
You can still use "~\" in the actual URL property to bypass this property. For example, in the following code:
[C#] MyMenu1.ImageBaseDirectory = "~/Images";
MenuItem1.LeftIcon.Url = "one.gif";
MenuItem2.LeftIcon.Url = "~/two.gif";
[Visual Basic.NET] MyMenu1.ImageBaseDirectory = "~/Images"
MenuItem1.LeftIcon.Url = "one.gif"
MenuItem2.LeftIcon.Url = "~/two.gif"
The final value for MenuItem1's left icon URL would be "<approot>/Images/one.gif", but the final value for MenuItem2's left icon URL would be "<approot>/two.gif".
See Also
WebControl Class | EO.Web Namespace