Reading a file from a URL at design-time

Discussion in 'ASP .Net Building Controls' started by maxcocco, Jul 19, 2006.

  1. maxcocco

    maxcocco Guest

    Im' building a custom menu control based on a XML file.
    I've added the following property:

    private string _xmlSourceUrl;

    [Category("Data"),
    DefaultValue(""),
    Description("XmlDataSource_DataFile"),
    Editor("System.Web.UI.Design.XmlDataFileEditor, System.Design,
    Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a",
    typeof(UITypeEditor))]
    public string XmlSourceUrl
    {
    get { return _xmlSourceUrl; }
    set { _xmlSourceUrl = value; }
    }

    which works fine.

    When I pick the url for the XML file, I get a value like
    "~/xml/menu.xml".
    How can i read this file at design-time, so that i can update the
    preview of my control?

    Thanx,
    Max
     
    maxcocco, Jul 19, 2006
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jon paugh
    Replies:
    1
    Views:
    759
  2. flamesrock
    Replies:
    8
    Views:
    477
    Hendrik van Rooyen
    Nov 24, 2006
  3. Neo

    select a url at design time

    Neo, Aug 14, 2004, in forum: ASP .Net Building Controls
    Replies:
    5
    Views:
    136
  4. WALDO

    How do I get the url of control's page at design time?

    WALDO, Oct 20, 2004, in forum: ASP .Net Building Controls
    Replies:
    9
    Views:
    164
    WALDO
    Oct 22, 2004
  5. Just D.
    Replies:
    0
    Views:
    446
    Just D.
    Aug 11, 2004
Loading...

Share This Page