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
Abhilash J A
536
2.4k
596.2k
Get innerHTML value from dynamically generated textbox MVC5
Jan 20 2017 4:01 AM
Hello everyone,
I am creating a dynamic table with textbox and multiple images by input type file.
function
handleFileSelect(e) {
selDiv = document.querySelector(
"#dvPreview"
);
for
(
var
i = 0; i < fileList.length; i++) {
selDiv.innerHTML +=
"<tr><td><img src="
+ objectUrl +
" /></td><td>
<input id='txtImgdescription' type='text'/>
</td><td><input class='check_class' type='checkbox'/> <a onclick='delete_user($(this))'> X </a></td></tr>"
;
}
I want image description from textbox with respect to corresponding image. So I have done, after bind the table on .cshtml page there is model class, the I can not the value from view to controller.
I did tried write textbox like model=>model.Imgdescription
<
input
id
=
'txtImgdescription'
type
=
'text'
/>
instead of
<
td
>
@Html.TextAreaFor(
model
=
>
model.Imgdescription)
</
td
>
but nothing happened. Then view look like this,
Please help me...
Reply
Answers (
1
)
chk the code n give suggestion ?
get path of SqlLite database those ara created by javascript