In asp.net mvc, how does the Controller pass values in fckeditor?

Source: Internet
Author: User

Environment Description: software environment: asp tutorial. net mvc3 + vs2010 system environment: windows xp sp3 Browser: ie8 (for peace in the world, for social stability, in order not to be despised by everyone. I have already abandoned ie6 !) In the previous article, we talked about the configuration of fckeditor in asp.net and its foreground methods. We receive view data in the controller.

[Httppost]
Public actionresult index (formcollection form)
{String a = form ["content"];
Return view ();
}
Of course, we all think it is very good here. When we download the breakpoint to return view! Unfortunately, the tragedy happened. Unfortunately, the html we passed was encoded! Although this encoding mechanism has brought us a lot of trouble! But it makes our program safer! Avoid unnecessary cross-site attacks and one-sentence Trojans! Of course, if you want to bring up a dialog box that appears when someone else opens your page, it is very unfortunate that a problem may occur. Here we need a non-encoded content, so we need to modify the program to decode the encoded html code. The Code is as follows [httppost]
Public actionresult index (formcollection form)
{
String a = server.html decode (form ["content"]);
Return view ();
} Of course, the result will be shown in OK! The entire article is ko!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.