ReadXml(MapPath()) problem

Results 1 to 2 of 2

Thread: ReadXml(MapPath()) problem

  1. #1
    Join Date
    Dec 1969

    Default ReadXml(MapPath()) problem

    I have several xml files I would like to display in a datalist. What I want to do is have "one" generic/template (verse a different, duplicate page for each file) aspx page that will display a selected file. The selected file name is passed as a parameter from another page.<BR><BR>I am able to recieve the file name in the generic page via the request.querystring("id"). <BR><BR>The problem I am having is I can&#039;t seem to get the request.querystring("id") in the MapPath() as shown here: mydatafile.ReadXml(MapPath("./xml/Emergency_vets_xml.xml")) when I subsitute it for "Emergency_vet_xml.xml" in this example.<BR><BR>How does one get a varible inside the MapPath() directive or method?

  2. #2
    Join Date
    Dec 1969

    Default RE: ReadXml(MapPath()) problem

    &#062; mydatafile.ReadXml(MapPath("./xml/Emergency_vets_xml.xml")) <BR><BR>you&#039;re not even trying to use a querystring there. here :<BR><BR>mydatafile.ReadXml(MapPath("./xml/" + Request.QueryString("fileName")))<BR><BR>though it depends what language you&#039;re using. you haven&#039;t offered a hint on that.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts