We have an existing .Net 4.0 web form application that allows users to view local files by clicking on hyperlinks inside of gridview control. The application is using "file://server/folder/document" to open network shared files. The links work fine in Internet Explorer 11 but don't work in MS Edge. The links are visible in Edge, but users are not able to click on the links. I've read that this feature has been blocked in modern browsers(Edge, Chrome). Does anyone have any suggestions to allow the links to work in Edge without modifying security policies?
Protected Sub FileGrid_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles FileGrid.RowDataBound
If e.Row.RowType = ListItemType.AlternatingItem Or e.Row.RowType = ListItemType.Item Then
Dim fiCurrent As FileInfo = e.Row.DataItem
Dim lnkFile As HyperLink = e.Row.FindControl("hlFile")
lnkFile.NavigateUrl = "\\server\folder\"& fiCurrent.Name
End If
End Sub
<asp:GridView ID="FileGrid" runat="server">
<Columns>
<asp:TemplateField HeaderText="Attachment Name">
<ItemTemplate>
<asp:HyperLink ID="hlFile" runat="server" Target="_blank"></asp:HyperLink>
</ItemTemplate>
</asp:TemplateField>
</Columns>
</asp:GridView>