locked
property as browsable tree for image path RRS feed

  • Question

  • User-1221966532 posted

     Hi,

    How could I achieve to have a web control property, where I could browse the Project tree to select a file for an Image source, ie: I have a property called SinglePlusImage and if I click the property I get the same browsable tree as if you want to add a source to an asp:Image control and can choose from files added to the project?

    Thanks 

    Thursday, March 20, 2008 7:44 AM

Answers

  • User-1559919801 posted

    Try using following attribute above your property;

    [System.ComponentModel.Editor(GetType(System.Web.UI.Design.UrlEditor)]

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, March 20, 2008 2:01 PM

All replies

  • User-1559919801 posted

    Try using following attribute above your property;

    [System.ComponentModel.Editor(GetType(System.Web.UI.Design.UrlEditor)]

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, March 20, 2008 2:01 PM
  • User-1221966532 posted

    hi alisakhi,

    thanks for your reply, which gave me the lead. It certainly was not complete, but was the information I was after and with a short google-ing found the right form of the Editor attribute.

    I used the complete

    [System.ComponentModel.Editor(typeof(System.Web.UI.Design.UrlEditor), typeof(System.Drawing.Design.UITypeEditor))]

    public string ImageURL

    {

    get{...}

    set{...} 

    version which is the file browsing editor usually seen in asp control properties.

    Monday, March 24, 2008 8:45 PM