Interviews4 answers
Can I send HTML string to Controller? if Yes then How.?
4 Answers
May be it'll be helpful for you -
Index.csHtml
------------------------
@{
ViewBag.Title = "title";
Layout = "~/Views/Shared/_Layout.cshtml";
}
Sourabh DwivediPosted Aug 19, 2015, 2:15 AM EDT
Yes you can, there is two ways
1. Using web.config ---> appsettings
2. Put one attribute ([ValidateInput(false)]) onto the action that you want to posting back on the server side
Khan Abrar AhmedPosted Jun 16, 2015, 2:58 AM EDT
http://stackoverflow.com/questions/16682450/passing-string-with-html-tags-to-controller-in-asp-net-mvc
Munesh SharmaPosted Jun 15, 2015, 8:33 PM EDT
Yes we can send HTML string to Controller.
we need to put
[ValidateInput(false)]
on the action method on controller side.
Pavan SatputePosted May 25, 2015, 3:46 AM EDT


