locked
How to open XML file from ASP Hyperlink control RRS feed

  • Question

  • How can I open a XML file from the location mentioned in the web.config file using Hyperlink control?

    I have an aspx page with hyperlink control and in code behind I do the following:

    hypLink.Text = "Transformed XML";
    
    
    
    hypLink.NavigateUrl = ConfigurationSettings.AppSettings["OutputXML"];

    web.config looks like:

    <add key="OutputXML" value="C:\Working\MyTest\XMLTransform\App_Data\Transformed.xml"/>
    This code is not working. In IE, it doesn't do anything but in FF, it throws a error box with message that the "FF doesn't know how to open this address..."
    • Moved by Rudedog2 Thursday, September 23, 2010 3:34 PM : ASP.NET is off-topic (From:Visual C# General)
    Thursday, September 23, 2010 2:40 PM

Answers

  • Please.  Post questions about the topics related to ASP.NET at http://forums.asp.net.

    For questions related to ASP.NET use the ASP.NET forum .

    Thanks, ahead of time.



    Mark the best replies as answers. "Fooling computers since 1971."

    http://rudedog2.spaces.live.com/default.aspx

    Thursday, September 23, 2010 3:07 PM
  • This was moved out of the C# forum.

    You can try asking in the ASP.NET forum, as Rudedog suggests.

    Or I can move it into a specific XML forum if you'd like.

    This is regarding your code:

    hypLink.Text = "Transformed XML";
    
    hypLink.NavigateUrl = ConfigurationSettings.AppSettings["OutputXML"];web.config looks like:
    
    <add key="OutputXML" value="C:\Working\MyTest\XMLTransform\App_Data\Transformed.xml"/>
    

    Thanks!

     


    Ed Price a.k.a User Ed, Microsoft Experience Program Manager (Blog, Twitter, Wiki)
    Saturday, December 24, 2011 1:44 AM

All replies

  • Please.  Post questions about the topics related to ASP.NET at http://forums.asp.net.

    For questions related to ASP.NET use the ASP.NET forum .

    Thanks, ahead of time.



    Mark the best replies as answers. "Fooling computers since 1971."

    http://rudedog2.spaces.live.com/default.aspx

    Thursday, September 23, 2010 3:07 PM
  • This was moved out of the C# forum.

    You can try asking in the ASP.NET forum, as Rudedog suggests.

    Or I can move it into a specific XML forum if you'd like.

    This is regarding your code:

    hypLink.Text = "Transformed XML";
    
    hypLink.NavigateUrl = ConfigurationSettings.AppSettings["OutputXML"];web.config looks like:
    
    <add key="OutputXML" value="C:\Working\MyTest\XMLTransform\App_Data\Transformed.xml"/>
    

    Thanks!

     


    Ed Price a.k.a User Ed, Microsoft Experience Program Manager (Blog, Twitter, Wiki)
    Saturday, December 24, 2011 1:44 AM