I'm working with a GridView table and have a dropdown control inside of it. my main task here is create a cascading dropdown with a webpart I'm designing. to that end, the XML file is supposed to supply the values to it.

I have code inside the page load function which is supposed to load the XML file but it always comes up blank and I don't know why.

Here is an example of the C# code:

                DataSet DS = new DataSet();
                string physicalPath = HttpContext.Current.Server.MapPath("../FormA/XML-FS.xml");
                string webPath = HttpContext.Current.Server.MapPath("http://hsphxvsp2010t:20103/_catalogs/masterpage/XML-FS1.xml");
                ddlFundingSource.DataTextField = "fsName";
                ddlFundingSource.DataValueField = "fsID";
                //ddlFundingSource.DataSource = DS.Tables[0].DefaultView;
                ddlFundingSource.DataSource = DS;

Have tried both path strings, to no avail as well as the XmlDataSource control which is seemingly broken altogether.

and my XML.





what is wrong here?

  • Are any errors reported? May 4, 2018 at 2:28
  • no errors it just won't load into the dropdown list.
    – prejt
    May 4, 2018 at 16:59

1 Answer 1


If that is your complete XML, then you are missing your start tag and the XML is not well formed.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.