get physical file path from computer hard disk on web file upload

KALEEM
 
on Apr 16, 2016 03:20 AM
3385 Views

Select file path location

like

D:/Image/profile.jpg

<input type="file" value="select File" />

 

Download FREE API for Word, Excel and PDF in ASP.Net: Download
Andrea
 
on Apr 16, 2016 03:20 AM
Hi @KALEEM,
Please try the following

Get Physical Path of a File using FileUpload control in asp.net

It might help you.

Cheers Andrea.
KALEEM
 
on Apr 16, 2016 03:22 AM

i am asking in html

dharmendr
 
on Apr 18, 2016 03:48 AM

Hi KALEEM,

Refer the below code.

HTML

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
    <script type="text/javascript">
        function getfilename(fu) {
            var filepath = $(fu).val();
            alert(filepath);
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <input id="fu" type="file" name="file" onchange="return getfilename(this)" />
    </div>
    </form>
</body>
</html>
Demo
KALEEM
 
on Apr 18, 2016 05:58 AM

please get location of browse item (complete) location

Suppose i browse an image with the name popup.jpg

and it is in my computer hard disk D

then path sholud be capture like this

 

D:/Image/popup.jpg at the place of popup.jgp

dharmendr
 
on Apr 18, 2016 06:26 AM