问题描述
因为怕受到攻击,让我用下面这个去写,因为不太清楚VB.NET怎么写,所以找高手帮忙写一下代码。VB.NETExample:DimsbAsStringBuilder=NewStringBuilder(_HttpUtility.HtmlEncode(input))sb.Replace("<b>","<b>")sb.Replace("</b>","<b>")sb.Replace("<i>","<i>")sb.Replace("</i>","</i>")Response.Write(sb.ToString())
login.aspx代码<IE:HOMEPAGEid="oHomePage"/><formid="Form1"method="post"runat="server">...<asp:textboxid="txtEmpNo"runat="server"Width="88px"MaxLength="10"style="BORDER-RIGHT:#adadad1pxsolid;BORDER-TOP:#adadad1pxsolid;BORDER-LEFT:#adadad1pxsolid;BORDER-BOTTOM:#adadad1pxsolid"Height="20px"></asp:textbox></td><tdalign="right"rowspan="3"><imgsrc="image/main/login_images03.gif"width="29"height="99"border="0"></td></tr><tr><td><P><asp:textboxid="txtPwd"runat="server"Width="88px"TextMode="Password"style="BORDER-RIGHT:#adadad1pxsolid;BORDER-TOP:#adadad1pxsolid;BORDER-LEFT:#adadad1pxsolid;BORDER-BOTTOM:#adadad1pxsolid"Height="20px"></asp:textbox></P></td></tr><tr><td><P><asp:imagebuttonid="btnLogin"tabIndex="3"runat="server"ImageUrl="image/main/login_icon.gif"></asp:imagebutton><ahref="#"OnMouseOut="na_restore_img_src('login_icon','document')"OnMouseOver="na_change_img_src('login_icon','document','images/login_icon_a.gif',true)"></a></P>
不知道这段代码需要怎么改写,,,如果可以加我Q895898970.
解决方案
解决方案二:
怎么把得到的用户名,StringBuilder类,去过滤一下呢
解决方案三:
这段代码怎么添加到aspx页面里面啊VB.NETExample:DimsbAsStringBuilder=NewStringBuilder(_HttpUtility.HtmlEncode(input))sb.Replace("<b>","<b>")sb.Replace("</b>","<b>")sb.Replace("<i>","<i>")sb.Replace("</i>","</i>")Response.Write(sb.ToString())
解决方案四:
replace过滤