我想实现的功能是使用webclient自动填写网页1.apsx的表单,然后提交给2.aspx,网页2.aspx接收1.aspx传过来的值,使用的事server.transfer方法,然后再自动填写2.aspx的表单,结合1.aspx传过来的值和2.aspx表单中的值,一起提交数据库 
我现在只会使用webclient自动填写1.aspx的表单并提交,后续的就不会了,请高人解答! 
我现在的代码是: 
            string submitButton = "Button1"; 
            // 页面的 VeiwState(可以通过IE打开页面,右键“查看源文件”取得) 
            string viewState = "/wEPDwULLTExNTc2NTI3OTlkZL4ZDqPRvq06DzXBg7UYs+omOZO1"; 
            // 页面的 EventValidation(可以通过IE打开页面,右键“查看源文件”取得) 
            string eventValidation = "/wEWBAL93InACQLs0bLrBgLs0fbZDAKM54rGBvzbLkSU69B/vP/DB+V7zWeKjbtM";             submitButton = System.Web.HttpUtility.UrlEncode(submitButton); 
            viewState = System.Web.HttpUtility.UrlEncode(viewState); 
            eventValidation = System.Web.HttpUtility.UrlEncode(eventValidation); 
            try 
            { 
                // 要提交表单的URI字符串。 
                string uriString = "http://localhost/WebSite1/1.aspx"; 
                // 要提交的字符串数据。格式形如:user=uesr1&password=123 
                string postString = "TextBox1=a&TextBox2=b" + "&Button1=" + submitButton + "&__VIEWSTATE=" + viewState + "&__EVENTVALIDATION=" + eventValidation; 
                // 初始化WebClient 
                WebClient webClient = new WebClient(); 
                webClient.Headers.Add("Content-Type", "application/x-www-form-urlencoded"); 
                // 将字符串转换成字节数组 
                byte[] postData = Encoding.ASCII.GetBytes(postString); 
                // 上传数据,返回页面的字节数组 
                byte[] responseData = webClient.UploadData(uriString, "POST", postData); 
                // 将返回的将字节数组转换成字符串(HTML); 
                //    ASP.NET 返回的页面一般是Unicode,如果是简体中文应使用 
                //    Encoding.GetEncoding("GB2312").GetString(responseData) 
                string srcString = Encoding.UTF8.GetString(responseData); 
上面是自动填写并提交1.aspx的表单 后续的代码请高人指点,或者使用别的方法也行 呵呵