using System.Net;
using System.Text;
try
{
WebClient myclient = new WebClient();
byte[] databuffer = myclient.DownloadData(URL);
string maintext = Encoding.Default.GetString(databuffer);
myclient.Dispose();
}
catch (System.Net.WebException err)
{
MessageBox.Show(err.Message);
}
try
{
WebClient myclient = new WebClient();
string url = "http://www.cninfo.com.cn/jjzx/zcjz.jsp";
NameValueCollection nvc = new NameValueCollection();
nvc.Add("fundCode", code值);
nvc.Add("smt", "查询");
byte[] databuffer = myclient.UploadValues(url, "POST", nvc);
string maintext = Encoding.Default.GetString(databuffer);
myclient.Dispose();
}
catch (System.Net.WebException err)
{
MessageBox.Show(err.Message);
}