HTTP Posting with VB Code, (or best solution)

Asked By TK Neva
28-Jan-10 05:06 PM
Earn up to 0 extra points for answering this tough question.
I am trying to post an XML file to a secure HTTP website, but I don't know where to start.  Does anyone have any ideas on the coding for this in VB.  I would probably want to run the script on a schedule on my server so that it will look for any files in a certain directory, post them, then move them to an archive when posted to the site.

If anyone has any ideas/suggestions, I appreciate it.  Any other suggestions on how to do this would also be great.

Thanks!

  Get the latest COM xml parser (msxml4 or maybe msxml5)

Robbe Morris replied to TK Neva
28-Jan-10 05:18 PM

If you have IE 7 or 8 on your server, you probably already have it.  These old classic articles can help point you in the right direction.

http://www.eggheadcafe.com/articles/20010209.asp

  webBrowser1 button.InvokeMember("click");

Hamit YILDIRIM replied to TK Neva
28-Jan-10 05:37 PM

Hi TK Neva,

        private void Form1_Load(object sender, EventArgs e)
        {           
            webBrowser1.Navigate("site name");
            while (webBrowser1.ReadyState!=WebBrowserReadyState.Complete)
            {
                Application.DoEvents(); //Bu kod ile programın kitlemesini önlüyor.
            }
            HtmlElement user = webBrowser1.Document.GetElementById("User name ID");
            user.SetAttribute("value","inputa girilecek değer");
            HtmlElement pass = webBrowser1.Document.GetElementById("Pwd ID");
            pass.SetAttribute("value","inputa girilecek değer");
            HtmlElement button = webBrowser1.Document.GetElementById("submit butonunun ID");
            button.InvokeMember("click");
        }

I think you want to say abow,

 

Good Works..

Create New Account