C#: 提取网页中的javascript代码
public static void Main()
{
WebRequest req = WebRequest.Create("http://blog.csdn.net/xiaofengsheng");
try
{
WebResponse result = req.GetResponse();
Stream ReceiveStream = result.GetResponseStream();
StreamReader readerOfStream = new StreamReader(ReceiveStream,
System.Text.Encoding.GetEncoding("UTF-8"));
string temp = readerOfStream.ReadToEnd();
Regex ex = new Regex(
"<script.+?type ?= ?(\"|')text/javascript(\"|')>.*?</script>",
RegexOptions.Singleline);
MatchCollection mc = ex.Matches(temp);
foreach (Match m in mc)
{
Console.WriteLin
相关文档:
微软在其.net战略中,对其主推的Web Service做了大肆的宣扬。现在,Web
Service正如火如荼地发展着,相关的各项新技术层出不穷。Web
Service的发展正构筑着互联网时代美好的明天。在本文中,我将向大家介绍Web Service的一些基本知识、如何用C#建立一个Web
Service。通过文章,我们还将对WSDL、UDDI以及未来的Web ......
1. 简述 private、 protected、 public、 internal 修饰符的访问权限。答 . private : 私有成员, 在类的内部才可以访问。 protected : 保护成员,该类内部和继承类中可以访问。 public : 公共成员,完全公开,没有访问限制。 internal: 在同一命名空间内可以访问。2 .列举ASP.NET 页面之间传递值的几种方式。 答. ......
在相同字符串的许多操作上,使用StringBuilder类会比使用String对象更有效率。
当你对一个string对象赋值时,这时会生成一个这个对象的副本,如果你赋值多次的话在系统中就会保存多个这个对象的副本,会对系统资源造成很大的浪费,但是StringBuilder不会出先上述情况
String数据类型代表的 ......
这是一个有关分页的实例,仅供参考(代码来自网络)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Data.SQLite;
using System.Threading;
using System.Collections;
us ......