脚 本 之 家 www.jb51.net
页面导航:  不限条件-->ne
本地搜索:
注意:并没有实现CSS中的图片采集,且图片的正则还有待完善。[code]usingSystem;usingSystem.Data;usingSystem.Configuration;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;usingSystem.Web.UI.WebControls.WebParts;usingSystem.Web.UI.HtmlControls;//引入空间usingSystem.Net;usingSystem.IO;usingSyst...
http://www.jb51.net//article/15897.htm
[code]privateintGetUrlError(stringcurl){intnum=200;if(this.method==1){HttpWebRequestrequest=(HttpWebRequest)WebRequest.Create(newUri(curl));ServicePointManager.Expect100Continue=false;try{((HttpWebResponse)request.GetResponse()).Close();}catch(WebExceptionexception){if(exception.Status!=WebException...
http://www.jb51.net//article/15896.htm
查了很多处理日志,说的都是在Web.Config里面加什么语句,就是下面这些:[code]<httpHandlers>  <removeverb="*"path="*.asmx"/>  <addverb="*"path="*.asmx"validate="false"type="System.Web.Script.Services.ScriptHandlerFactory,System.Web.Extensions,Version=1.0.61025.0,Culture=neutral,PublicKeyToken=31bf3856ad364e35"/>  ...
http://www.jb51.net//article/15857.htm
classCommand{publicvirtualvoidExecute(){}}classInvalidOperationException<T>:InvalidOperationExceptionwhereT:Command{publicInvalidOperationException(stringmessage):base(message){}//somespecificinformationabout//thecommandtypeTthatthrewthisexception}staticclassCommandExtensions{publicstaticvoidT...
http://www.jb51.net//article/15834.htm
绝大多数的人只熟悉高层的框架如:WebForms和WebServices--这些都在ASP.NET层次结构在最高层。这篇文章的资料收集整理自各种微软公开的文档,通过比较IIS5、IIS6、IIS7这三代IIS对请求的处理过程,让我们熟悉ASP.NET的底层机制并对请求(request)是怎么从Web服务器传送到ASP.NET运行时有所了解。通过对底层机制的了解,可以让我们对ASP.net有更深的理解。IIS5的ASP.net请求处理过程对图的解释:IIS5.x一个显著的特征就是WebServer和真正的ASP.NETApplication的分离。作为WebServer的IIS运行在一个名为In...
http://www.jb51.net//article/15818.htm
首先在App_GlobalResources新建resx资源文件。如:不同语言的resx中项目应该具有相同的名称:中文资源项英文资源项完了以后就可以使用这些名值对了,[code]<asp:LiteralID="Literal1"runat="server"Text="<%$Resources:lang,userinfo%>"/>[/code]或者[code]<%=Resources.lang.userinfo%>[/code]至此你可以更换浏览器的语言首选项来看看效果了。接下去的问题是怎么通过程序本身的方式来更换语言项。1.可以往web.config中增加&...
http://www.jb51.net//article/15815.htm
///<summary>///得到站点用户IP///</summary>///<returns></returns>publicstaticstringgetUserIP(){returnHttpContext.Current.Request.ServerVariables["REMOTE_ADDR"].ToString();}///<summary>///去除字符串最后一个','号///</summary>///<paramname="chr">:要做处理的字符串</param>///<re...
http://www.jb51.net//article/15811.htm
需要引入命名空间:[code]usingSystem.Net;usingSystem.IO;[/code]函数内容:[code]///<summary>///根据Url获得源文件内容///</summary>///<paramname="url">合法的Url地址</param>///<returns></returns>publicstaticstringGetSourceTextByUrl(stringurl){WebRequestrequest=WebRequest.Create(url);request.Timeo...
http://www.jb51.net//article/15786.htm
1、如果在样式文件或页面文件代码中直接用display:none对元素进行了隐藏,载入页面后,在没有通过js设置样式使元素显示的前提下,使用js代码会无法正确获得该元素的一些属性,比如offSetTop,offSetLeft等,返回的值会为0,通过js设置style.display来使元素显示后才能正确获得这些值。2、使用display:none隐藏的元素不会被百度等搜索网站检索,会影响到网站的SEO,某些情况下可以使用left:-100000px来达到同样效果。3、如果是通过样式文件或<style>css</style>方式来设置元素的display:none样式,用...
http://www.jb51.net//article/15781.htm
asp.net压缩文件夹调用示例:rar("e:/www.jb51.net/","e:/www.jb51.net.rar");asp.net解压缩rar文件调用示例:unrar("e:/www.jb51.net.rar","e:/");[code]usingSystem;usingSystem.Collections.Generic;usingSystem.Text;usingSystem.Diagnostics;namespaceBLL{publicclassCmdUtil{//////执行cmd.exe命令//////命令文本///命令输出文本publicstaticstringExeCo...
http://www.jb51.net//article/15765.htm
[code]staticstringGetEncoding(stringurl){HttpWebRequestrequest=null;HttpWebResponseresponse=null;StreamReaderreader=null;try{request=(HttpWebRequest)WebRequest.Create(url);request.Timeout=20000;request.AllowAutoRedirect=false;response=(HttpWebResponse)request.GetResponse();if(response.StatusCode==Ht...
http://www.jb51.net//article/15764.htm
共有:672/10,当前8/68页  [首页] [上一页] 4 5 6 7 8 9 10 11 [下一页]  [尾页] 转到: