Hi All
I need to update some data on a web page through the httpwebrequest.
For which i am writing the code below . Kindly tell me where the flaw
is as it is not updating the values.
Thanks and regards
Shantanu
WebNetCred = new System.Net.NetworkCredential("test","test123");
System.Uri uriDest = new Uri("http://aww.ngn.bel.alcatel.be/prp/
cgi-bin/secure/DRForm.cgi?root=AL&number=9YZ-00153-
ABAA&mode=update&dr0p.original=2003-02-28&dr0p.planned=&dr0p.status=&dr1.original=&dr1.pl anned=&dr1.status=&dr3.original=&dr3.planned=&dr3. status=&dr4.original=&dr4.planned=&dr4.status=&dr5 .original=&dr5.planned=&dr5.status=&dr6.original=& dr6.planned=&dr6.status=&del1.original=&del1.plann ed=&del1.status=&del2.original=&del2.planned=&del2 .status=&dr0.original=&dr0.planned=&dr0.status=&dr 2.original=&dr2.planned=&dr2.status=&obr.original= &obr.planned=&obr.status=");
HttpWebRequest httpRequest =
(HttpWebRequest)WebRequest.Create(uriDest);
httpRequest.Method = "POST";
httpRequest.PreAuthenticate = true;
httpRequest.Credentials = WebNetCred;
httpRequest.Timeout = 150000;
httpRequest.KeepAlive = true;
httpRequest.ContentType = "application/x-www-form-urlencoded";
httpRequest.ContentLength = 0;// bytes.Length;
MessageBox.Show("2");
WebResponse response = httpRequest.GetResponse();
HttpWebResponse httpResponse = (HttpWebResponse)response;
System.IO.Stream stream = httpResponse.GetResponseStream();
System.IO.StreamReader readStream = new
System.IO.StreamReader(stream, System.Text.Encoding.UTF8);
string txt = readStream.ReadToEnd();
MessageBox.Show("3");
readStream.Close();
stream.Close();
MessageBox.Show("txt : " + txt);
MessageBox.Show("4");