If you want to open a network share with a LinkButton, you can set it’s href attribute manually with code behind:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test.aspx.cs" Inherits="Rvl.HelperTools.Website.Test" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
    <title>Untitled Page</title>
    <form id="form1" runat="server">
        <asp:LinkButton ID="LinkButton1" runat="server">Show network share with LinkButton</asp:LinkButton>
        <a href="\Myshare" id="showReportsButton">Show network share with Link</a>

        /// <summary>
        /// Event fires on pageload
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
            this.LinkButton1.Attributes["href"] = @"\Myshare";


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.