473,378 Members | 1,496 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

How to open XML file from a ASP Hyperlink control

11
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:

Expand|Select|Wrap|Line Numbers
  1. hypLink.Text = "Transformed XML";
  2. hypLink.NavigateUrl = ConfigurationSettings.AppSettings["OutputXML"];
web.config looks like:

Expand|Select|Wrap|Line Numbers
  1. <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..."
Sep 23 '10 #1
2 2471
Frinavale
9,735 Expert Mod 8TB
Move the Transformed.xml file out of the App_Data folder because you won't be able to access it from the browser there.

Then specify a valid URL (not a directory path) for the hypLink.NavigateUrl property.

-Frinny
Sep 23 '10 #2
Sri13
11
Thanks for the response, I will try that.
Sep 24 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Jonatan | last post by:
Hi all, I'm trying to upload files doing something like gmail. I almost got it but I have a problem when I post the form. Basicaly, I am doing the following. When the user presses the link...
0
by: Arjen | last post by:
Hello, Here is my datalist. <asp:DataList id="myDataList" CellPadding="4" Width="100%" runat="server"> <ItemTemplate> <span class="Normal"> <asp:HyperLink id="link" Text='<%#...
0
by: Tom Jorgenson | last post by:
I need to create a custom control that behaves like a HyperLink control EXCEPT where I can get into the events somewhere to programmatically decided whether to actually perform the link request, or...
6
by: sck10 | last post by:
Hello, Can you control the window attributes (toolbar, scrollbars, left and right exc.) when using the hyperlink control as you would when using javascript? For examle, I am using the...
7
by: Franck | last post by:
Hi, got a datagid which fills files paths in hyperlink controls. The path of these files looks like "\\MyServer\...\MyFile.xxx" How can I make my asp.net hyperlink control to open its linked...
1
by: The ants are driving me crazy | last post by:
The open file dialog control in Windows forms has an "Open" button. Is there a way to change the text of the button to something other than "Open"?
3
by: keithb | last post by:
Using a GridView, I get a "Specified cast is not valid" error when binding the Visible propery of a hyperlink control to a DataTable text field. The error goes away if I replace the data binding...
4
by: nuhura01 | last post by:
Hi, I want to create an 'open file button' using asp control button, which will display open file dialog box for users to choose the location of folders to be read. It might be easy for Windows...
1
by: klaydze | last post by:
hi, i don't know how to start my code in uploading an image using open file dialog control. any one who can help me? i want to view the picture that i want to upload using open file dialog and show...
1
by: sivasrec | last post by:
Hi, This is sivakumar from India. Now I am learning to ASP.NET 2.0.. I have a doubt.... I have used in a one hidden field control, 2 label controls, 2 button controls and...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.