Hi, Im writing a component for posting data to a webserver. http://www.domainname.com/fire/incoming.asp?user=xxxx&pass=xxxx&amount I tried using HttpWebrequest & Webclient to post data but it is returning an error if i paste the url in the browser it is working properly The code goes here ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ string User = "test3"; string Pass = "test3"; string amount = Server.UrlEncode(TextBox2.Text); string MobileNumber = "91"+TextBox1.Text; string postData = ("login="+User); postData += ("&pass="+Pass); postData += ("&amount="+amount); string uriString = "http://www.domainname.com/fire/incoming.asp"; WebClient myWebClient = new WebClient(); myWebClient.Headers.Add("Content-Type","application/x-www-form-urlencoded"); byte[] byteArray = Encoding.ASCII.GetBytes(postData); byte[] responseArray = myWebClient.UploadData(uriString,"POST",byteArray); lblStatus.Text = Encoding.ASCII.GetString(responseArray); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Can someone help ..... Thanks in advance Abraham
Abraham Durairaj
Posts
-
posting data to another url using webclient -
Reg. Posting data to other urlIm posting some data to this URL. Can someone tell me where i can post data to this url like this. string uriString = "http://domainname.com/incoming.asp"; WebClient myWebClient = new WebClient(); myWebClient.Headers.Add("Content-Type","application/x-www-form-urlencoded"); (or ) do we need to post only to string uriString = "http://domainname.com/"; WebClient myWebClient = new WebClient(); myWebClient.Headers.Add("Content-Type","application/x-www-form-urlencoded"); Can anyone help me how to go about this? Abraham
-
SMS using mobile.netHello, How do I send SMS using mobile.net Thanks in advance Regards, Abraham.
-
Regular ExpressionsHello, can anyone help me in solving this issue. I have a string like "76/78NagdeviSt2ndFlrNagdeviM3" using regular expressions I would like to change it to "76/78 Nagdevi St 2nd Flr Nagdevi M3" Thanks in advance. Regards, Abraham