Click to See Complete Forum and Search --> : text from program ---> web www


abab
July 1st, 2007, 04:02 AM
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 ?

creatorul
July 1st, 2007, 12:40 PM
I am a little confused about your question. I assume you want to build a registering software that will communicate with a website.

HttpWebRequest (http://msdn2.microsoft.com/en-us/library/system.net.httpwebrequest(vs.71).aspx)and HttpWebResponse (http://msdn2.microsoft.com/en-us/library/system.net.httpwebresponse(VS.71).aspx)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.

abab
July 1st, 2007, 01:29 PM
For example this web:
https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false&continue=http%3A%2F%2Fmail.google.com%2Fmail%3Ftab%3Dwm%26ui%3Dhtml%26zy%3Dl&ltmpl=ca_tlsosm_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 ?

creatorul
July 1st, 2007, 02:56 PM
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.

wmain
July 1st, 2007, 09:06 PM
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,

Mutant_Fruit
July 1st, 2007, 10:29 PM
(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.

abab
July 2nd, 2007, 02:18 AM
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 ?