oosumu

懒鬼,门外汉

博客园 首页 新随笔 联系 订阅 管理

2004年12月22日 #

摘要: 大多数脚本利用发生在用户可以将可执行代码(脚本)插入您的应用程序时。默认情况下,ASP.NET 提供请求验证。不管窗体发送包含什么样的 HTML,该验证都会引发错误。 您可以使用下列方法防止脚本利用: 在接受或显示字符串之前,将 HTML 编码应用于它们,以便字符串不包括任何可执行元素。 如果您的应用程序需要接受某些 HTML,则禁用请求验证并创建您自己的 HTML 筛选器。 ... 阅读全文
posted @ 2004-12-22 16:25 - - 阅读(1351) 评论(0) 推荐(0) 编辑

摘要: publicstaticvoidCheck(boolcondition,StringerrorText,intlineNumber) { if(!condition) { StringdetailMessage=String.Empty; ... 阅读全文
posted @ 2004-12-22 16:03 - - 阅读(920) 评论(0) 推荐(0) 编辑

摘要: 首先,声明 private const String KEY_ID = "id"; privateboolReadQueryString(outintId) { Id=-1; // //LetthisfunctionthrowanexceptioniftheQuerySt... 阅读全文
posted @ 2004-12-22 15:54 - - 阅读(693) 评论(0) 推荐(0) 编辑

2004年12月21日 #

摘要: 'Height="16px"Width="32px"Text="修改"CssClass="bbutton"DialogToOpen="dlgWinEdit"> privatevoiddlgW... 阅读全文
posted @ 2004-12-21 17:52 - - 阅读(862) 评论(0) 推荐(0) 编辑

2004年12月16日 #

摘要: ... 阅读全文
posted @ 2004-12-16 17:39 - - 阅读(671) 评论(0) 推荐(0) 编辑