我已经安装了VS2010和MVC2并使用tinyMCE测试了一个简单的表单.当我在tinyMCE中发布textarea的内容时,我得到了可怕的YSD和消息
"有潜在危险......"
我以前见过这个,所以我把它ValidateInput(false)放在控制器上,但没有快乐 - 我仍然得到错误.
edit.aspx中的页面代码是:
<% using (Html.BeginForm()){ %>
<!-- Gets replaced with TinyMCE, remember HTML in a textarea should be encoded -->
<textarea id="elm1" name="mceText" rows="15" cols="80" style="width: 80%">
<p>
This is some example text that you can edit inside the
<strong> TinyMCE editor</strong>.
</textarea>
<br />
<input type="submit" name="save" value="Submit" />
<input type="reset" name="reset" value="Reset" />
<%} %>
Run Code Online (Sandbox Code Playgroud)
和控制器的行动是:
[AcceptVerbs(HttpVerbs.Post)]
[ValidateInput(false)]
public ActionResult Edit(string mceText)
{
return View();
}
Run Code Online (Sandbox Code Playgroud)
任何想法 - (我知道代码不完整)已经尝试了几个小时,但每个人只是说使用ValidateInput(false)
我跟随Scott Hanselman使用WebMatrix在Mix11上构建了FrontEnd.http://live.visitmix.com/Keynotes
他所做的第一件事就是使用ASP.NET网页管理链接.当我运行WebMatrix时,该选项不可用.我已经下载了最新版本的Web Matrix和VS工具.我以管理员身份运行Web Matrix,但仍然无法看到该选项.
如何查看"管理"链接,我需要做什么?