TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Adalat Khan
651
1.5k
871k
Display Picture from the string path stored in DB in image
Feb 26 2019 2:02 AM
I want to display image in an image control using the string path stored in the database. The string path is retrieved successfully from the database but the image does not display. I tried my best but i did not success. Please help me in this regard. Thanks in advance. I tried the following:
Following is my HTML Code
<input type="image" id="img1" />
<input type="button" value="Display" onclick="DisplayPicture()" />
Following is my Javascript code
<script>
function DisplayPicture()
{
var DisplayImage = document.getElementById("img1");
var path = "C:\Users\Adalat Khan\Dropbox\Personel\My Files\Pics\pic1.jpg";
DisplayImage.src = path.src;
DisplayImage.style.width = '160px';
DisplayImage.style.height = '135px';
}
</script>
I used the above code just to check a single picture from a constant string path of an image but not success. Please correct my code.
Reply
Answers (
10
)
how to read textfile using streamreader split() and stored
not connect to server mssql