473,406 Members | 2,217 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,406 software developers and data experts.

Datagrid broken link

Mel
I have a datagrid control that has one column displaying a filename.
When the link is clicked it opens the file. How do I open a file that
resides on a remote server? The code below does not work. When I
click the link I get error #404 Page Not Found. PLEASE HELP!

'start of example code. The FullName = "\\SalesServer\Quotes
\123456\<file name>"
<asp:DataGrid runat="server" id="dgQuote" Font-Names="Verdana"
AutoGenerateColumns="False" AlternatingItemStyle-
BackColor="#eeeeee"
HeaderStyle-BackColor="Navy" HeaderStyle-ForeColor="White"
HeaderStyle-Font-Size="15pt" HeaderStyle-Font-Bold="True"
AllowPaging="True" AllowSorting="True" Font-Size="Small"
CellPadding="2">
<Columns>
<asp:HyperLinkColumn DataNavigateUrlField="FullName"
DataTextField="Name"
HeaderText="File Name" />
</Columns>
<SelectedItemStyle BackColor="#C5BBAF" />
<PagerStyle HorizontalAlign="Center" />
<AlternatingItemStyle BackColor="#E3EAEB" />
<HeaderStyle BackColor="#1C5E55" Font-Size="Small"
ForeColor="White" Font-Bold="True" />
</asp:DataGrid>
'end of example code
Apr 11 '08 #1
1 1183
Mel
On Apr 11, 1:38 pm, Mel <MLights...@gmail.comwrote:
I have a datagrid control that has one column displaying a filename.
When the link is clicked it opens the file. How do I open a file that
resides on a remote server? The code below does not work. When I
click the link I get error #404 Page Not Found. PLEASE HELP!

'start of example code. The FullName = "\\SalesServer\Quotes
\123456\<file name>"
<asp:DataGrid runat="server" id="dgQuote" Font-Names="Verdana"
AutoGenerateColumns="False" AlternatingItemStyle-
BackColor="#eeeeee"
HeaderStyle-BackColor="Navy" HeaderStyle-ForeColor="White"
HeaderStyle-Font-Size="15pt" HeaderStyle-Font-Bold="True"
AllowPaging="True" AllowSorting="True" Font-Size="Small"
CellPadding="2">
<Columns>
<asp:HyperLinkColumn DataNavigateUrlField="FullName"
DataTextField="Name"
HeaderText="File Name" />
</Columns>
<SelectedItemStyle BackColor="#C5BBAF" />
<PagerStyle HorizontalAlign="Center" />
<AlternatingItemStyle BackColor="#E3EAEB" />
<HeaderStyle BackColor="#1C5E55" Font-Size="Small"
ForeColor="White" Font-Bold="True" />
</asp:DataGrid>
'end of example code
I should have said "How do I open a file that resides on a DIFFERENT
server" meaning the server is on site; NOT a remote server which
implies off site.
Apr 11 '08 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Ashish Shridharan | last post by:
Hi All I have been trying to add a control to the header cell of a datagrid on my ASP.NET page. These controls are defined in the HTML as ASP.NET web controls. They are being added into the...
0
by: Rudolph Araujo | last post by:
Hi, I needed to build a data grid in which the first column has hyperlinks rather than simple text. I found the following code on this newsgroup and it works fine except for one problem. When I...
1
by: Rick | last post by:
Hello all, I hope all is well with you. I am having a seriously difficult time with this problem. Allow me to set up the problem. I have a System.Web.UI.Page with the following controls...
28
by: Craig Cockburn | last post by:
I have a tool which tells me the number of times that visitors attempt to access a link from my site to an external site and what the response code received was. In the event of the remote site...
3
by: CharlesA | last post by:
Hi folks, I'm using VS 2003 with Framework 1.1 I'm writing an intranet application that makes use of Datagrids I will be creating the columns declaratively (and not using autogenerate) I wish...
9
by: rn5a | last post by:
A Form has a DataGrid which displays records from a SQL Server 2005 DB table. Users can modify the records using this DataGrid for which I am using EditCommandColumn in the DataGrid. This is the...
0
by: arlie_maija | last post by:
Hey - I'm writing a control that contains a DataGrid, and I'm unable to get the update event to fire. When I click the update link, the edit event fires. heres the details... my control...
3
by: Giampaolo Rodola' | last post by:
Hi there, I would like to know if such function would be correct for verifying if a link is broken and/or circular. def isvalidlink(path): assert os.path.islink(path) try: os.stat(path)...
4
by: Mel | last post by:
I have a datagrid control that has one column displaying a filename. When the link is clicked it opens the file. How do I open a file that resides on a remote server? The code below does not...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.