hi,
i am trying to post data to a php site from my .aspx page.
The php site takes data in two steps. In first step of php site there are 4-text boxes and 3-check boxes and 1-dropdown, all fields are mandatory.
anybody please help.
Thanks in advance.

[code]

public void cvPostData()
{
string boundary = Guid.NewGuid().ToString();
CookieContainer cookies = new CookieContainer();
HttpWebRequest request = HttpWebRequest.Create(url) as HttpWebRequest;

request.Method = "POST";
request.ContentType = string.Format("multipart/form-data; boundary={0}", boundary);
// request.PreAuthenticate = true;
request.CookieContainer = cookies;
StringBuilder sb = new StringBuilder();

#region

sb.AppendFormat("--{0}", boundary);
sb.AppendFormat("\r\n");
sb.AppendFormat("Content-Disposition: form-data; name=\"RegisterFirstName\"");
sb.AppendFormat("\r\n");
sb.AppendFormat("\r\n");
sb.AppendFormat("Mrs");
sb.AppendFormat("\r\n");

sb.AppendFormat("--{0}", boundary);
sb.AppendFormat("\r\n");
sb.AppendFormat("Content-Disposition: form-data; name=\"RegisterLastName\"");
sb.AppendFormat("\r\n");
sb.AppendFormat("\r\n");
sb.AppendFormat("title");
sb.AppendFormat("\r\n");

sb.AppendFormat("--{0}", boundary);
sb.AppendFormat("\r\n");
sb.AppendFormat("Content-Disposition: form-data; name=\"RegisterEmailAddress\"");
sb.AppendFormat("\r\n");
sb.AppendFormat("\r\n");
sb.AppendFormat("mark.williams@fiveriverssupport.net");
sb.AppendFormat("\r\n");

sb.AppendFormat("--{0}", boundary);
sb.AppendFormat("\r\n");
sb.AppendFormat("Content-Disposition: form-data; name=\"RegisterPassword\"");
sb.AppendFormat("\r\n");
sb.AppendFormat("\r\n");
sb.AppendFormat("123456789");
sb.AppendFormat("\r\n");

sb.AppendFormat("--{0}", boundary);
sb.AppendFormat("\r\n");
sb.AppendFormat("Content-Disposition: form-data; name=\"RegisterPasswordConfirm\"");
sb.AppendFormat("\r\n");
sb.AppendFormat("\r\n");
sb.AppendFormat("123456789");
sb.AppendFormat("\r\n");

sb.AppendFormat("--{0}", boundary);
sb.AppendFormat("\r\n");
sb.AppendFormat("Content-Disposition: form-data; name=\"RegisterHomeLocation\"");
sb.AppendFormat("\r\n");
sb.AppendFormat("\r\n");
sb.AppendFormat("b27 7xu");
sb.AppendFormat("\r\n");

sb.AppendFormat("--{0}", boundary);
sb.AppendFormat("\r\n");
sb.AppendFormat("Content-Disposition: form-data; name=\"RegisterReferer\"");
sb.AppendFormat("\r\n");
sb.AppendFormat("\r\n");
sb.AppendFormat("17");
sb.AppendFormat("\r\n");

sb.AppendFormat("--{0}", boundary);
sb.AppendFormat("\r\n");
sb.AppendFormat("Content-Disposition: form-data; name=\"RegisterAcceptTerms\"");
sb.AppendFormat("\r\n");
sb.AppendFormat("\r\n");
sb.AppendFormat("0");
sb.AppendFormat("\r\n");

#endregion

sb.AppendFormat("--{0}--", boundary);
byte[] fulldata = Encoding.Default.GetBytes(sb.ToString());
request.ContentLength = fulldata.Length;
using (Stream sw = request.GetRequestStream())
{
sw.Write(fulldata, 0, fulldata.Length);
}
HttpWebResponse response = request.GetResponse() as HttpWebResponse;
using (StreamReader sr = new StreamReader(response.GetResponseStream()))
{
HttpContext.Current.Response.Write(sr.ReadToEnd());
}
}