HttpRequestValidationException
occurs when I try post when txtBulletin
contains any HTML, like "Hello<br />World
"
Bulletin.aspx
<asp:UpdatePanel ID="upContent" runat="server" UpdateMode="Always">
<ContentTemplate>
<div class="content bulletin-content">
<asp:TextBox ID="txtBulletin" runat="server"
TextMode="MultiLine" />
<div class="bulletin-edit">
<asp:ImageButton ID="btnSaveBulletin" runat="server"
ImageUrl="~/images/icons/check.gif"
CommandName="SaveChanges"
OnCommand="btnEditBulletin_Click"
Visible="false" />
</div>
</div>
</ContentTemplate>
</asp:UpdatePanel>
Bulletin.aspx.cs
protected void btnEditBulletin_Click(object sender, CommandEventArgs e)
{
if (e.CommandName == "Edit")
{
// Do something
}
else if (e.CommandName == "SaveChanges")
{
// Do something
}
else if (e.CommandName == "Cancel")
{
// Do something
}
}
I have no idea how to bypass this, or why it evens does the validation for me. On error, the page no longer handles any PostBack events until I refresh the page.