asp.net - Hyperlink to a text file how to open in webform? -
i have webform , want create hyperlink text file, opens on internet explorer in new window. have added following
<a href="file:///d:/test/test.txt" id="hpltest" runat="server">testhyperlink</a> now when click on hyperlink, nothing happening. no error. when open browser , type file:///d:/test/test.txt, file opening.
i appreciate if me out.
you can not give physical path in href file://, give url instead.
<a href="http://www.yourdomain.com/test/test.txt" id="hpltest" runat="server">testhyperlink</a> if file within current site use relative path.
<a href="~/test/test.txt" id="hpltest" runat="server">testhyperlink</a> the ~ here root path.
Comments
Post a Comment