473,395 Members | 1,629 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,395 software developers and data experts.

Fill in textboxes programatically in ASPX

Thank you in advance for any and all assistance, it is GREATLY appreciated.

I'm trying to programatically fill in textboxes in an aspx page from vb.net
2005 using the Shell command to call the webpage. I would like to know if
there is a way to programmatically hard code textbox information, like
UserName and Password to a specific website. If so, can someone give me some
code sample of how to use the Shell function?
--
Michael Bragg, President
eSolTec, Inc.
a 501(C)(3) organization
MS Authorized MAR
looking for used laptops for developmentally disabled.
Sep 7 '06 #1
3 1719
Hi,

You may call Shell() with AppWinStyle.NormalFocus to focus the opened
browser window, then use SendKey to simulate your input.

For example:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim procID As Integer
procID = Shell("""c:\program files\internet explorer\iexplore.exe""
""http://www.hotmail.com""", AppWinStyle.NormalFocus)
System.Threading.Thread.Sleep(3000)
System.Windows.Forms.SendKeys.Send("someone")
System.Windows.Forms.SendKeys.Send("{TAB}")
System.Windows.Forms.SendKeys.Send("password")
End Sub

I hope this helps. Please feel free to post here if anything is unclear.

Sincerely,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 7 '06 #2
Walter,

Thank you. With a little modification I have the fields filled in, now I'm
needing the code to programmatically send the {ENTER} key to the website.
--
Michael Bragg, President
eSolTec, Inc.
a 501(C)(3) organization
MS Authorized MAR
looking for used laptops for developmentally disabled.
"Walter Wang [MSFT]" wrote:
Hi,

You may call Shell() with AppWinStyle.NormalFocus to focus the opened
browser window, then use SendKey to simulate your input.

For example:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim procID As Integer
procID = Shell("""c:\program files\internet explorer\iexplore.exe""
""http://www.hotmail.com""", AppWinStyle.NormalFocus)
System.Threading.Thread.Sleep(3000)
System.Windows.Forms.SendKeys.Send("someone")
System.Windows.Forms.SendKeys.Send("{TAB}")
System.Windows.Forms.SendKeys.Send("password")
End Sub

I hope this helps. Please feel free to post here if anything is unclear.

Sincerely,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscripti...ult.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscripti...t/default.aspx.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 7 '06 #3
Hi Michael,

Thank you for your quick update.

I suppose what you needed is a call to:

System.Windows.Forms.Sendkeys.Send("{ENTER}")

Regards,
Walter Wang (wa****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support

==================================================
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
==================================================

This posting is provided "AS IS" with no warranties, and confers no rights.

Sep 7 '06 #4

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

Similar topics

3
by: Bill Schneider | last post by:
I have rebuilt a govermental formular with a report by putting some 30 textboxes in the page header at the right places for printing. I want to fill these textboxes with the data from a query,...
0
by: Hai Nguyen | last post by:
I have 2 textboxes created programatically. I want to capture the values stored in these 2 textboxes. After hitting a button, I can't restore the values Thanks
1
by: John | last post by:
Hi, I need to enter data into a database and the only method I have to enter that data is through a web form. Is there a way I can write a csharp program that will get the form, fill it out...
2
by: Aaron Ackerman | last post by:
I have been having just on going problems with my MS Datagrids. I have NO idea what I am doing wrong. What is esentially happening is that say I have three records in my Dataset. I click on the...
1
by: MasterChief | last post by:
I have an asp page right now and I want to fill a drop-down list with information like a persons name from an xml file. Once the user picks a person from the drop down list I want it to go back to...
8
by: Rak | last post by:
I am looking for a way to programatically change the .net version of the virtual directory that I am creating within a aspx page. As part of creating a new customer in my asp.net 2 application, it...
1
by: Patricio | last post by:
Hello all I have a form that contains several textbox. I have also a DataSet that contains the Fill function by ID. How can I assign the DataSet values into my TextBox? Thanks a lot.
1
by: mnath | last post by:
i am creating a user interface where user can give multiple inputs in a grid fashion. i have decided panel control is to be used and textboxes are to added dynamically. now i am not able to add more...
2
by: englishman69 | last post by:
Hello, I have been banging my head against this one for a while... Searches online have revealed many different proposals for correcting my issue but none that I can follow! My basic situation...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.