Jump to content
Xtreme .Net Talk

Arul

Members
  • Posts

    6
  • Joined

  • Last visited

About Arul

  • Birthday 12/15/1974

Personal Information

  • Occupation
    Developer
  • Visual Studio .NET Version
    VS 2005 and VB6
  • .NET Preferred Language
    C#, VB.Net

Arul's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Arul

    XML posting

    I hv done this.... THANKS FOR PEOPLE WHO JUST VIEWED AND NOT REPLIED IN THIS SLEEPING FORUM Here is the code: private void button2_Click(object sender, EventArgs e) { WebRequest myRequest = null; WebResponse myResponse = null; try { string Page; string outputst; string fileName = "C:\\Regsitering_Data.xml"; string uri = "https://securee.xxxxxxxxxabc.com/xmlautomation/Upload.aspx"; myRequest = WebRequest.Create(uri); // Post method myRequest.Method = "POST"; // content type myRequest.ContentType = "text/xml"; // Wrap the request stream with a text-based writer StreamWriter writer = new StreamWriter(myRequest.GetRequestStream()); // Write the xml text into the stream writer.WriteLine(this.GetTextFromXMLFile(fileName)); writer.Close(); // Send the data to the webserver myResponse = myRequest.GetResponse(); Stream str = myResponse.GetResponseStream(); StreamReader strReader = new StreamReader(str); outputst = ""; while ((Page = strReader.ReadLine()) != null) { outputst = outputst + Page; } } catch (Exception Ex) { MessageBox.Show(Ex.Message.ToString()); } } private string GetTextFromXMLFile(string file) { StreamReader reader = new StreamReader(file); string ret = reader.ReadToEnd(); reader.Close(); return ret; } }
  2. Arul

    XML posting

    Hi I am very new to C# and using VS 2005 I need to read some data from database and should post the data in XML format to a Gateway (ASP website). I dont know anything regarding how to Post a XML request to a web page. I have formated the data in XML, but dont know how to move into next step Please advice me what are the steps that I need to take to post a XML request
  3. Thanks a lot... I corrected and now its working
  4. Hi, I tried to connect DB2 database using ADO.Net in C#. It connected successfully. However, I would like to close the database at 'finally' block. When I tried to close the connection at "finally" block, it is showing an error saying "Use of unassigned local variable" Cant we close the connection in Catch or finally part in Try & Catch block. I have pasted my code below. Error is coming in the catch and finally section Am I doing in wrong way? private void button1_Click(object sender, EventArgs e) { OdbcConnection MyDBConn; String ConnString; try { ConnString = "Dsn=comp1;uid=use1;pwd=pwd1;mode=SHARE;dbalias=advcare;patch2=6;patch1=1024;lobmaxcolumnsize=1048575;longdatacompat=1"; MyDBConn = new OdbcConnection(ConnString); MyDBConn.Open(); } catch (Exception ex) { MessageBox.Show("Error in Connection" + ex.ToString()); } finally { MyDBConn.Close(); } }
  5. Thanks a lot dude....
  6. Dear All, I am very new to .Net Framework. I dont have any experience in .Net framework at all, but having 9 years of experience in VB6 and 5 yrs experience in Oracle (PL SQL) Now, I want to learn Visual Studio 2005 and would like to start with C# (Dont like to start with VB.Net, though it may be easy for VB6 developer). I need great help from you. My Goal is developing ASP.Net pages by using C# 2005. Please note that I dont have any experience in ASP too (But know HTML and DHTML) 1. Please suggest a good tutorial to start learning C# 2005 (It would be nice if you suggest VS2005 rather than earlier version of C#) 2. Is there any FREE online books available for learning C# 2005? 3. Is it so hard to learn C# 2005 for VB6 programmer (I know basic OOP concept and having 2 yrs of experience in Delphi) Please help me to go to next level
×
×
  • Create New...