473,385 Members | 1,843 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

filling values in a web page using C#

Hi i am developing an IE plugin which will auomatically provide
username and password to web pages on click of a button. I was trying
to develop a dummy button to test and am trying to use
HTMLInputElementClass. the code compiles well but gives a un time
exception in the browser. the code goes like :

private void bttnEnterUserName_Click(object sender, EventArgs e)
{
HTMLDocumentClass doc = new HTMLDocumentClass();
doc = (HTMLDocumentClass) this.Explorer.Document;
HTMLInputElementClass ele = new HTMLInputElementClass();

if (doc.url.ToString() ==
"https://www.google.com/accounts/ServiceLogin?service=mail&passive=true&rm=false&co ntinue=http%3A%2F%2Fmail.google.com%2Fmail%2F%3Fui %3Dhtml%26zy%3Dl&ltmpl=cm_blanco&ltmplcache=2")
{

foreach (HTMLInputElementClass element in
doc.getElementsByTagName("input"))
{
ele = (HTMLInputElementClass)
element.getAttribute("Email", 0);
element.value = "prayag.narula";
}
}

}
what am i doing wrong. Wat other aproach can i use???

Oct 1 '06 #1
0 1006

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: hboothe_no_spam | last post by:
Hello, all, I've read through both of the groups I'm posting to, and all over the groups, regarding filling PDF forms with data from VB. I have Acrobat 5 (and the SDK), and am using VB 6. I can...
1
by: rkmoray | last post by:
I have created a Multi Dimentional array, but having problems filling it. int mCount=0; mCount=ds.Tables.Rows.Count; string arrayppsa = new string ; DataTable myDataTable=ds.Tables;...
1
by: thegame | last post by:
Filling One DataGrid Based on Selection from Another DataGrid - Both in Separate User Controls Hello, I have an interesting dilemma. I have an ASPX page with two user controls (two ASCXs). ...
5
by: Dave | last post by:
How would I go about filling a combo box with some existing enumeration values? Can I bind it to the enumeration? Then, once the selection is made from the combo box, set a property to the...
2
by: drdave | last post by:
Hi All, I'm filling an arraylist with other arraylists within a loop and within the first iteration and addition all is fine.. however when I clear my value holding temporary array I lose the...
2
by: r.roest | last post by:
Hi, I'm looking for a way to fill static vars from a different c-file. Here is what I want to do: file1.c static DEBUG calling function X using DEBUG to display information calling...
2
by: Joris De Groote | last post by:
Hi, I have a dropdownlist that contains should contain several values from the database, I fill it up in de page_load() with this code (at the end of the message) The code also adds a...
0
by: Derek Vincent | last post by:
Why am I having problems filling my dataset when I select fields of type varchar(350) from interbase? I can fill the dataset when I select every other field in the table but I receive and error...
2
by: navilon | last post by:
is it possible to fill out a form on a website using C#? for example, logging in to a website such as myspace.
4
by: ITCraze | last post by:
Hello everyone, I have three tables CompanyMst ,BranchMst and DeptMst. CompanyMst contains: CompanyId(Primary Key) ,CompanyName. BranchMst contains: CompanyId(Foreign...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.