Hello all,
I'm trying to show Value of Html.TextAreaFor in Javascript Confirm Box but my code doesn't work. Maybe somebody has a good idea how to fix it..
This is my code:
<% using (Html.BeginForm())
{ %>
<%= Html.Hidden("ThreadId", Html.Encode(this.Model.ThreadId))%>
<%= Html.TextAreaFor(m=>m.Quote,7,40,null)%>
<br /> <button name="view" value="ViewQuoteButton" onclick="return ViewQuote()">
View
</button>
<% } %>
<script type="text/javascript">
function ViewQuote() {
if (confirm(document.valueOf( "here I'trying to show value of TextAreaFor"))) {
return true;
}
else {
} return false;
}
</script>
Thank you all and take care, Ragims