允许HTML标签回发 [英] Allowing html tags in a postback

查看:86
本文介绍了允许HTML标签回发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个文本框,用户可以输入文本,包括HTML标记。

I've got a textbox where the user can enter text that includes html markup.

当然,当页面做任何事情,涉及到回发,是因为解析器认为在文本框中的HTML code是一个黑客试图破坏(错误500)。

Of course, when the page does anything that involves a postback, it breaks (error 500) because the parser thinks the html code in the textbox is a hack attempt.

现在,我知道有一种方法可以让,但我不能为我的生命记忆。

Now, I know there is a way to allow it, but I can't for the life of me remember.

帮助?

我使用Visual Studio 2008中,VB.NET,如果它是相关的。

I'm using Visual Studio 2008, VB.NET, in case it's relevant.

享受
随机

推荐答案

在页面顶部:

<%@ Page ValidateRequest='False' %>

这篇关于允许HTML标签回发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆