Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
6
Answers
FileUpload - ImageButton - FilePath on ImageButton
Kavi suja
11y
2.4k
1
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?
Post
Reset
Cancel
Answers (
6
)
Next Recommended Forum
how to fetch last inserted record?
Retrive Image from Database