Reading a file from a URL at design-time

M

maxcocco

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top