C# 向网站发布空数据错误
我想用表单应用程序将数据发布到网站。我在上课C# 向网站发布空数据错误,c#,class,post,web,C#,Class,Post,Web,我想用表单应用程序将数据发布到网站。我在上课 string name = pst.Text; WebClientEx Wex = new WebClientEx(name); 在课堂上: public class WebClientEx : WebClient { public CookieContainer _cookies = new CookieContainer(); public string Newpost;
string name = pst.Text;
WebClientEx Wex = new WebClientEx(name);
在课堂上:
public class WebClientEx : WebClient
{
public CookieContainer _cookies = new CookieContainer();
public string Newpost;
public WebClientEx(string name)
{
name = Newpost;
}
Im使用此方法发布数据:
public string getPost()
{
WebClientEx client = new WebClientEx();
CQ dom = CQ.Create(Page);
data.Add("value", Newpost);
然而,Newpost总是空的。你能帮我吗?我想你想做什么
public WebClientEx(string name)
{
Newpost = name;
}