Posted By: trisonics | Nov 29th, 2007 @ 2:04 AM
page 1 of 1
Comments: 3 | Views: 905

I am in process for converting a oracle form application with oracle backend to .net front-end and oracle backend.
Basically only the front-end from will become ASP.NET page the backend remaining the same and ODP.NET for database access.
Although I am not a forms developer but I can see that the form's "post" option is a very useful functionality. For db validation etc
Can anyone tell me how to achieve the same in a .net application programmatically.

Thanks

trisonics wrote:


I am in process for converting a oracle form application with oracle backend to .net front-end and oracle backend.
Basically only the front-end from will become ASP.NET page the backend remaining the same and ODP.NET for database access.
Although I am not a forms developer but I can see that the form's "post" option is a very useful functionality. For db validation etc
Can anyone tell me how to achieve the same in a .net application programmatically.

Thanks



I'm not sure if I've misunderstood you, but are you asking how to send HTML <form> data via the POST method to a website from .NET?

If so, you use something like the following:

using System.Net;
using System.Collections.Speciailized;
using System.Text;

public class Program {
  private const string MySiteURI = "http://localhost/test.aspx";

  public static void Main(string[] args){
    NameValueCollection postData = new NameValueCollection();
    postData.Add("key", "value");

    WebClient webby = new WebClient();
    byte[] response = webby.UploadValues(new Uri(MySiteURI), postData);
    string strReponse = Encoding.Default.GetString(response);

    Console.WriteLine("Response: ");
    Console.WriteLine();
    Console.WriteLine(strReponse);
    Console.WriteLine();
    Console.WriteLine("Press [ENTER] to exit.");
    Console.ReadLine();
  }
}


There is nothing stopping you asp.net from doing a client side HTML form post. ASP.NET has state associated with its forms (one per page) so it has some scaffolding associated with a post back. The ASP.NET controls will post back if you set AutoPostBack to true some controls like buttons its default others like Checkbox it is left at false.

If you want out of band calls you need to use AJAX of some type. Microsoft has its own out of the box implementation which you either download or if your using 2008 is built in.

I personally use Telerik's AJAX manager. It makes it even easier for most thing and some of their other controls are time savers like SpellCheck, Editor, ComboBox (templated), list goes on.
Sorry I think I did not made myself very clear.

Actually I want to have the data in Oracle rollback segment(not the actual table). So that I can fire some SQL to do validations etc. So that if the validation passes I will issue a commit or just issue a rollback command.

Oracle D2K Forms POST does that automatically. As there is nothing .Net or ODP.Net to do the same. I am trying to achieve that programatically.
page 1 of 1
Comments: 3 | Views: 905