Tuesday, June 11, 2019

Allow Html

1. Allow html > by default this is disabled in mvc, if i want to pass html tag in string, we have to                 AllowHtml attribute

       [AllowHtml]
       Public string Detail { get; set; }

2. Allow Html On Action Method :- addding filter   [ValidateInput(false)]

      [HttpPost]
      [ValidateInput(false)]
      public ActionResult Create(Employee emp)
     {
           return View()
     }



No comments:

Post a Comment

Raw Insert query in EF8 or Entity Framwork 8

          public async Task<object> InsertRack(Rack RackInsert)         {             try             {                 sql = " i...