MVC Post Model error

Last post 10-15-2015, 6:28 AM by ozzy48. 7 replies.
Sort Posts: Previous Next
  •  10-13-2015, 10:21 AM 81090

    MVC Post Model error

    Hi,

    i have problem about post data.

     

     and error image

     

     

  •  10-13-2015, 12:51 PM 81092 in reply to 81090

    Re: MVC Post Model error

    Hi,

     

    Can you try demo page "output_xhtml"? does it gets the same error too?  Have you add [ValidateInput(false)] for your controller function which using the editor?

     

    Regards,

     

    ken 

  •  10-14-2015, 5:57 AM 81098 in reply to 81092

    Re: MVC Post Model error

    i tried debug project for mvc4_cs_razor ,but i didnt. i had a error : "project not loaded correctly". so i couldnt try demo page.

    i added [ValidateInput(false)] for my controller function.

     

    have you demo project for check codes ?

     

    Thanks. 

  •  10-14-2015, 10:49 AM 81101 in reply to 81098

    Re: MVC Post Model error

    Hi,

     

    Can you try the code below in your controller file? does it gets the same error too?

     

    1. [ValidateInput(false)]  
    2.     public ActionResult toolbar_editor()  
    3.     {  
    4.         PrepairEditor(delegate(Editor editor)  
    5.         {  
    6.                editor.Text = "abc";  
    7.         });  
    8.         return View();  
    9.     }  
     

    View page you can use the code below

     

    1. <!DOCTYPE html>  
    2. <html>  
    3. <head>  
    4.     <title>RichTextEditor - Default Toolbar Config</title>  
    5.     
    6. </head>  
    7. <body>  
    8.     <h1>  
    9.         Default Toolbar Config</h1>  
    10.     <p>  
    11.         This example simply shows the default toolbar config.  
    12.     </p>  
    13.     @Html.Raw(ViewBag.Editor)  
    14. </body>  
    15. </html>  
     

    Regards,

     

    Ken 

  •  10-15-2015, 2:54 AM 81111 in reply to 81101

    Re: MVC Post Model error

    Hi,

     

    i used this codes and editor worked. But i got error message when post model.

     

     i think [ValidateInput(false)] is not working.

     

    i got error this row.

     

     

         if (this.Request.HttpMethod == "POST")

                {

                    string formdata = this.Request.Form[editor.Name];

                    if (formdata != null)

                        editor.LoadFormData(formdata);

                } 

     

    Can you write post example ?

     

    Thanks. 

  •  10-15-2015, 2:57 AM 81112 in reply to 81111

    Re: MVC Post Model error

    Also i cant write

     <httpRuntime requestValidationModel="2.0">  command if i write it i get this error  "HTTP Hatası 500.19 - Internal Server Error"

     

    Thanks. 

  •  10-15-2015, 4:46 AM 81116 in reply to 81112

    Re: MVC Post Model error

    I had the same issue , but I able to fixed it , follow this thread and related link , somtime you may get an idea 
  •  10-15-2015, 6:28 AM 81119 in reply to 81116

    Re: MVC Post Model error

    Hi kelum,

     

    Thank you for answering.

    i fixed it.

View as RSS news feed in XML