CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 7 of 7
  1. #1
    Join Date
    Mar 2007
    Posts
    71

    text from program ---> web www

    I want that when I write something in textbox in my program and click button in my program, text from program from textbox is showing in web www on example on registering web where somebody should write yours name, nick, date of birth etc.
    Is that possible ?

  2. #2
    Join Date
    Mar 2006
    Location
    Craiova, Romania
    Posts
    439

    Re: text from program ---> web www

    I am a little confused about your question. I assume you want to build a registering software that will communicate with a website.

    HttpWebRequest and HttpWebResponse are the classes to work with. You have to dig a little to establish whether it is using POST or GET and other needed informations.
    Bogdan

    If someone helped you then please Rate his post and mark the thread as Resolved
    Please improve your messages appearance by using tags [ code] Place your code here [ /code]

  3. #3
    Join Date
    Mar 2007
    Posts
    71

    Re: text from program ---> web www

    For example this web:
    https://www.google.com/accounts/Serv...t&ltmplcache=2

    In this web we must write login and password - how can we write login and password in program c# i .net and after click some button in this programm, login and password showing from programm to fields in this web ?

  4. #4
    Join Date
    Mar 2006
    Location
    Craiova, Romania
    Posts
    439

    Re: text from program ---> web www

    In my previous post I gave you a solution for completing the fields of a website without the need of a browser.
    You want to interact with Internet Explorer ? You want to develop some auto-complete software ? That means you need to interop with certain browser.
    Bogdan

    If someone helped you then please Rate his post and mark the thread as Resolved
    Please improve your messages appearance by using tags [ code] Place your code here [ /code]

  5. #5
    Join Date
    Nov 2005
    Posts
    13

    Re: text from program ---> web www

    Try using the web browser control either on a windows form or as an object. You can use the get by id or get by name to find the control on the page (sometimes you just have to count the number of controls from the top of the page and use the index) the then once you have the object call the click method. You can also get the object representing the text controls to fill in the user and passwird,

  6. #6
    Join Date
    May 2007
    Posts
    1,546

    Re: text from program ---> web www

    Quote Originally Posted by wmain
    (sometimes you just have to count the number of controls from the top of the page and use the index)
    Don't *ever* do that except as an absolute last resort. That kind of program will break horribly every single time the webpage changes slightly. If the webmaster moves an ad panel from the side to the top, your application has just broken.
    www.monotorrent.com For all your .NET bittorrent needs

    NOTE: My code snippets are just snippets. They demonstrate an idea which can be adapted by you to solve your problem. They are not 100% complete and fully functional solutions equipped with error handling.

  7. #7
    Join Date
    Mar 2007
    Posts
    71

    Re: text from program ---> web www

    Code:
    using System;
    using System.Collections.Generic;
    using System.ComponentModel;
    using System.Data;
    using System.Drawing;
    using System.Text;
    using System.Windows.Forms;
    
    namespace WindowsApplication1
    {
        public partial class Form1 : Form
        {
            public Form1()
            {
                InitializeComponent();
            }
    
       
    
            
    
            private void button2_Click(object sender, EventArgs e)
            {
                string adres = textBox1.Text; 
                webBrowser1.Navigate(adres); 
            }
        }
    }

    I have got Internet Explorer in my program but I don't know how I can fill fields on the web www - could you give me example ?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured