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
Kasun Lee
NA
178
14.4k
Inserting an Image to webpage programatically, at runtime.
Aug 23 2018 11:41 PM
Hi!
I'm trying to intsert an image to a Windows Form > Webpage project. I tried to insert an Image control to webpage and assign the image to the control:
Image1.ImageUrl =
"1.jpg"
;
And I tried creating the Image on the run, and asignning it the jpg image:
Image image =
new
Image();
image.ID =
"image1"
;
image.ImageUrl =
"1.jpg"
;
image.ImageAlign = ImageAlign.AbsMiddle;
image.Visible =
true
;
Form.Controls.Add(image);
Nothing worked so far. What I'm doing wrong? (Images are both in bin and the project directories)
Thank you.
Reply
Answers (
2
)
Export Excel from Database in Asp.Net MVC using partial view
Login using existing logic in MVC 5