Java to C# conversion

K

K R

Hi,

Please let me know the equivalent code to the below code in c#
(ASP.NET).

This below code is written in java.

MyDataString =
#DREDOCID 1
#DREFIELDNAME Price
#DREFIELDVALUE 10
#DREDOCREF http://www.autonomy.com/autonomy/dynamic/autopage442.shtml
#DREFIELDNAME Country
#DREFIELDVALUE UK

SAMPLE CODE

URL suir_url = new URL("http://" +SUIRServer +":" +SUIRPort
+"/DREREPLACE?");
URLConnection suir_connection = suir_url.openConnection();
suir_connection.setDoOutput(true);
PrintWriter suir_out = new
PrintWriter(suir_connection.getOutputStream());
suir_out.println(MyDataString +"#DREENDDATA" +"\n\n"); // PASS data
as POST To Suir
suir_out.close();


Regards.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top