Chris Kennedy wrote:Are you setting the path initially in Page_Load like so:> I have a custom control which uses an XML file in the
> CreateChildControls event, the XML file is used to determine how many
> and what composite form elements to add. I can set the path to a
> different XML file on Page_Load event of the parent page. When I press a
> button even if contains no code it triggers a postback (which is
> normal). Even though I am resetting the location value in Page_load
> event I get a "The path is not of a legal form" error.
> It is like on the postback the XML value is not being passed to the
> control again.
If Not Page.IsPostBack then
myControl.XmlPath = ...
If so, are you sure that you're control is saving this value in tbe view
state? That is, does the property for XmlPath in your control look like:
Public Property XmlPath as String
Dim o as Object = ViewState("XmlPath")
If o is Nothing then
ViewState("XmlPath") = Value
* When you think ASP, think 4GuysFromRolla.com!