using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using System.Net;
using System.IO;
using System.Text.RegularExpressions;
using System.Web;
namespace WSSERVER
{
public partial class Test : Form
{
public Test()
{
InitializeComponent();
}
BZDM dm2 = new BZDM();
DM dm = new DM();
private void button1_Click(object sender, EventArgs e)
{
//getYL();
// getYL();
string url = "http://61.191.22.155/TYFW/InfoQuery/ZhaBasec.aspx";
StringBuilder sb=new StringBuilder();
string mes = getHTMLUTF(url);
Regex regex = new Regex("(?<=<input type=/"hidden/" name=/"__VIEWSTATE/" id=/"__VIEWSTATE/" value=/")[//s//S]*?(?=/" />)", RegexOptions.IgnoreCase);
MatchCollection matchs = regex.Matches(mes);
Regex regex2 = new Regex("(?<=<input type=/"hidden/" name=/"__EVENTVALIDATION/" id=/"__EVENTVALIDATION/" value=/")[//s//S]*?(?=/" />)", RegexOptions.IgnoreCase);
MatchCollection matchs2 = regex2.Matches(mes);
//DataSet ds=dm.getsql("select * from FH_SWZ_D WHERE TIME>TO_DATE('" + System.DateTime.Now.ToShortDateString() + "','YYYY-MM-dd') and NAME='"+space+"'");
sb.Append("__VIEWSTATE=" + c