Posted: 10/14/2011
Hi guysI'm a novice when it comes to asp.net or all things web developing really. But i managed to create a web page that look into a database and then publishes a link to either a .doc, .pdf, etcHtml link simply calls something like file://myserver/docs/example.doc and once you click on the link it open the document. This works fine in IE8 and IE9 but for some reason when clicking on the link within Chrome or Firefox nothing happens!does anyone know how to get this to work?A copy of the code is below
<html> <head runat="server"> <title>Doc Index</title> <link rel="stylesheet" type="text/css" href="mystyle.css" /> </head> <body> <img src="/Docindex/name.PNG" width="100" height="50" /> <br><br><br> <h1 style="text-align:center;"><u>Document Index</u></h1> <form id="form1" runat="server"> <asp:AccessDataSource ID="AccessDataSource1" runat="server" DataFile="G:\Builds\goldbuild.mdb" SelectCommand="SELECT [CustomerID], [LongName] FROM [Customer] ORDER BY [LongName]"> </asp:AccessDataSource> <asp:Label ID="Label1" runat="server" Font-Bold="True" Font-Names="Arial" style="margin-left: 25%" Font-Size="Small" Text="Customers:"></asp:Label> <asp:DropDownList ID="DropDownList1" runat="server" Height="36px" style="margin-left: 2px" Width="350px" AutoPostBack="True" DataSourceID="AccessDataSource1" DataTextField="LongName" DataValueField="CustomerID"> </asp:DropDownList> </p> <p> <asp:AccessDataSource ID="AccessDataSource2" runat="server" DataFile="G:\Builds\goldbuild.mdb" SelectCommand="SELECT [DocName], [FileName], [CustomerID] FROM [Documents] WHERE ([CustomerID] = ?)"> <SelectParameters> <asp:ControlParameter ControlID="DropDownList1" Name="CustomerID" PropertyName="SelectedValue" Type="String" /> </SelectParameters> </asp:AccessDataSource> </p> <div align="center"> <asp:DataList ID="DataList1" runat="server" BorderColor="Black" BorderStyle="Double" BorderWidth="5px" CellPadding="0" DataKeyField="DocName" DataSourceID="AccessDataSource2" ForeColor="Black" GridLines="Horizontal" style="margin-left: 0%" Width="60%"> <ItemTemplate> </div> <div align="left"> <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# Eval("FileName") %>' Text='<%# Eval("DocName") %>' Font-Size="Small" style="margin-left: 2%"></asp:HyperLink> <br /> <br /> </ItemTemplate> <SelectedItemStyle BackColor="#CC3333" Font-Bold="True" ForeColor="White" /> </asp:DataList> </div> </p> </form> </body> </html>
Posted: 10/15/2011
Hi,You need online dic viewer for example https://docs.google.com/viewer
Posted: 10/17/2011
Thanks for your post
google doc viewer is no good as i am behind a coperate network and the firewall stops google docs viewer from accessing the file.
Do you know of and application which i can install and run on my server that does the same thing?