asp.net替换和恢复html特殊字符
/// /// 替换html中的特殊字符 /// /// 需要进行替换的文本。 /// 替换完的文本。 public string HtmlEncode(string theString) {theString=theString.Replace(">", ">");theStrin
/// /// 替换html中的特殊字符 /// /// 需要进行替换的文本。 /// 替换完的文本。 public string HtmlEncode(string theString) {theString=theString.Replace(">", ">");theStrin
在早期学习c#的过程中,经常遇到这样的语句: public string StudentName {get{return stuName;}set{stuName=value;} }当时也不是很明白为什么要这样?学深了c#后,又没法对其做一个总结。今天看了《Visual c#.net程序设计教程》这
/// /// 快速验证一个字符串是否符合指定的正则表达式。 /// /// 正则表达式的内容。 /// 需验证的字符串。 /// 是否合法的bool值。 public static bool QuickValidate(string _express, string _value) {if (
/// /// 获取querystring /// /// 参数名 /// 返回值 public string q(string s) {if (Request.QueryString[s] != null){return Request.QueryString[s].ToString();}r
一.运行环境 虽然Microsoft公司推出Visual Studio .NET已经有一段时间了,但.NET Framework SDK却依然还是BETA版,分别是BETA 1和BETA 2。这二个版本之间也有很大的差异,譬如说,很多名称空间(NameSpace)的名字都不一样。我们这里选择的是B
URL 重写是截取传入 Web 请求并自动将请求重定向到其他 URL 的过程。比如浏览器发来请求hostname/101.aspx ,服务器自动将这个请求中定向为http://hostname/list.aspx?id=101。 url重写的优点在于:缩短url,隐藏实际路径提高安全性易于用户记忆和
文件上传 HttpPostedFile postFile = Request.Files["imgFile"]; if(postFile.FileName!=String.Empty){ex=postFile.FileName.Substring(postFile.FileName.LastInde
如果你的查询语句是select * from admin where username=''''"|or|-|+|,"; var sarray=new Array(); sarray=inj_str.split('|'); for (var i=0 ;i =0) return true; } ret
using System; using System.Data.Sql; using System.Text; namespace AllSqlServer {class Program{static void Main(string[] args){//SQLDMO.NameList names;
实现代码如下:using System; using System.Collections; using System.Text; using System.IO; using System.Collections.Specialized; using System.Text.RegularExpr