KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
So I have a razor view: @{ int i=1; foreach(var story in Model.Storylines) { <span style="float:left;">Storyline @i</span> <span style="float:right; margin-right:5px;">Character Count: @story.CharCount</span><br /><br /> <textarea id=@("entry"+@i) rows="5" style="width:730px; overflow:auto;">@story.Description</textarea><br /><br /> i++; } } So the textarea with id entry1 has a description like "this is a story" when the page initially loads. Once I type something into that text area, and then hit a button whose only function is: alert($("#entry1").text()); I still get "this is a story". Why isn't the textarea being updated with the text that I've typed in?
Tags (comma-separated)
Save Edits
Cancel