Tech
Forums
Jobs
Books
Events
Live
Interviews
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
6
Reply
FileUpload - ImageButton - FilePath on ImageButton
Kavi suja
Jul 8 2013 3:20 AM
2.4k
Reply
Hi,
I use Imagebutton as FileUpload Control using the following code.When i click on image,the popup for choosing file from local system will be shown.
<head runat="server">
<title></title>
<script type="text/javascript">
function chooseFile() {
document.getElementById("FileUpload1").click();
}
</script>
</head>
<body>
<form id="form1" runat="server">
<div>
<div style="height: 0px; overflow: hidden">
<asp:FileUpload ID="FileUpload1" runat="server" />
</div>
<asp:ImageButton ID="ImageButton1" runat="server" OnClientClick="chooseFile();" ImageUrl="btnlogin.png" />
</div>
</form>
</body>
</html>
Now I want to display the path of the selected file on imageButton after the file selected.Can anyone help me to do this?
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
6
)
Next Recommended Forum
how to fetch last inserted record?
Retrive Image from Database