一个页面上包括多个文本框,和dropdownlist,如果文本框中出现<br>时,选择dropdownlist就提示错误“sys.webforms.pagerequestmanagerservererrorexception:an unknown error occurred while processing the request on the server.the status code returned from the server was:500"请帮我看看怎样解决。
调试欢乐多
<tr>
<td bgcolor="#fffbf9" align="right">
<font color="red">*</font> 招聘岗位:
</td>
<td height="29" colspan="3" align="left" bgcolor="#fffbf9">
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
<ContentTemplate>
<asp:DropDownList Style="z-index: 0" ID="dropCate" runat="server" OnSelectedIndexChanged="dropCate_SelectedIndexChanged" AutoPostBack="True">
</asp:DropDownList>
<asp:DropDownList Style="z-index: 0" ID="dropCate1" runat="server">
</asp:DropDownList>
</ContentTemplate>
</asp:UpdatePanel>
</td>
</tr> <tr>
<td bgcolor="#fffbf9" align="right">
具体要求:</td>
<td bgcolor="#fffbf9" colspan="3" align="left">
<textarea id="txtDemand" rows="4" cols="50" name="txtIntro" runat="server"></textarea>
</td>
</tr>当具体要求填入<br>时,选择dorpdownlist就出现错误。
{
ParaValue = ParaValue.Replace("+", "").Replace("-", "").Replace("=", "").Replace("%", "").Replace("<", ">").Replace(">", "<").Replace("<>", "").Replace("'", "").Replace("[", "").Replace("]", "").Replace("!", "").Replace("@", "").Replace("#", "").Replace(",", "").Replace(";", ""); return ParaValue;
}
替换掉
strContent = strContent.Replace("<", ">");
strContent = strContent.Replace(">", "<");
strContent = strContent.Replace("\n", "<br>");
strContent = strContent.Replace(" ", " ");
comm.Parameters.Add("@job_describe", strContent);我这样写,怎么仍然报错呢?好像还是没有转换过来?
颠倒了吧