473,661 Members | 2,440 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Populating text box after opening default browser with C#

I was recently tasked with creating a .NET application that opens the
default browser to a specific webpage with the user name and password
populated. I have found the following code that uses C# to open IE
shown below

System.Diagnost ics.Process process = new
System.Diagnost ics.Process();
process.StartIn fo.FileName = "http://mywebsite.com";
process.Start() ;

Is there a way to pass text to the username and password to the
browser before running process.Start() or should I attempt to run a VB
Script after the browser has opened?

Thanks

Oct 13 '08 #1
2 2006
On Oct 13, 2:35 pm, beanz80 <bean...@gmail. comwrote:
I was recently tasked with creating a .NET application that opens the
default browser to a specific webpage with the user name and password
populated. I have found the following code that uses C# to open IE
shown below

System.Diagnost ics.Process process = new
System.Diagnost ics.Process();
process.StartIn fo.FileName = "http://mywebsite.com";
process.Start() ;

Is there a way to pass text to the username and password to the
browser before running process.Start() or should I attempt to run a VB
Script after the browser has opened?

Thanks
Hi,

Not that I know of. at least no in the way you are doing it.
If you use a WebBrowser control then you can populate the controls as
you want.
Oct 13 '08 #2
"Ignacio Machin ( .NET/ C# MVP )" <ig************ @gmail.comwrote in
message
news:82******** *************** ***********@17g 2000hsk.googleg roups.com...
On Oct 13, 2:35 pm, beanz80 <bean...@gmail. comwrote:
>I was recently tasked with creating a .NET application that opens the
default browser to a specific webpage with the user name and password
populated. I have found the following code that uses C# to open IE
shown below

System.Diagnost ics.Process process = new
System.Diagnos tics.Process();
process.StartIn fo.FileName =
"http://mywebsite.com";
process.Start() ;

Is there a way to pass text to the username and password to the
browser before running process.Start() or should I attempt to run a VB
Script after the browser has opened?

Thanks

Hi,

Not that I know of. at least no in the way you are doing it.
If you use a WebBrowser control then you can populate the controls as
you want.

You can make the username & pass part of the url.

http://user:pa**@url.com/

Something like that should work.

Eric B.

Oct 14 '08 #3

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

Similar topics

44
4705
by: Carlos Andr?s | last post by:
Hi everybody. I've got a problem. I'd like to avoid opening a new window when you have pressed the shift key and you click in the left button of the mouse. I've tried the next solution, in the body of the page I put the next code: <BODY onkeydown='notOpenNewWindow();'>
14
11074
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a window.open function? I would prefer not to create a separate HTML page. So far all I have is the basic var cwin = window.open('images/KJV-THANKS.gif', 'Thanks', 'width=243,height=420,'); cwin.focus();
8
41576
by: Orloff | last post by:
Hi, on most (all?) browsers, when you put the pointer on a <a href="..." title="popup text">this is a link</a> without clicking on the link, there is a popup caption with the "popup text". I would like to achieve the same with some text that is not a link. I realized that I could simply make it <a title="popup text">this is just some text</a>
3
4852
by: MrNobody | last post by:
I found an explanation of using Process.Start to open web pages but it has the following comments: // url's are not considered documents. They can only be opened // by passing them as arguments. So how do i get the default web browser ? The example used IExplore.exe but I don't want to try limiting to that.. I'd like to use the person's default browser...
3
1569
by: luna | last post by:
theres no errors in my code - but it does nothing at all - its supposed to be populating text boxes!! any ideas ? (im am pretty new to all this) If Not Page.IsPostBack Then Dim search As String Dim strConn As String = "server=Gringotts;uid=sa;pwd=password;database=database"
6
2872
by: Chris Leuty | last post by:
I am populating a multiselect Listbox from a dataset, with the content of the listbox filled by one table, and the selections determined from another table. So far, I have been keeping the dataset a denormalized mirror of the database, but I'm not having much luck getting the selection logic down (I haven't found a 'hook' where I can access the listbox object as an object to set the listitem's selected property before it gets rendered).. ...
5
3317
by: Brad | last post by:
In several aspx applications I export crytal reports to pdf, xls and doc files and then the aspx page writes the selected export file to the client browser. This all works with one small quirk: When I run any of the web apps on my workstations iis website, the pdf download always produces the "File Download" dialog, even though I have Confirm after Download turned off. When I select to Open the file from this dialog the file opens in...
13
3536
by: Mary | last post by:
I'll pulling my hair out on this one and would be so appreciative of any help. I am creating a data entry form to enter results of a student survey. There are 40 questions on the survey. The first 7 have to do with respondent information like grade, class and age. I have those in a table with a PK of RespondentId, which is autonumbered. Questions 8-40 all have the same format. For these questions I have a table set up with the...
4
1690
by: Guern1 | last post by:
Hi Need a bit of help here please to point me in the right direction. I have a java class file here which i wish from a menu item to open a web page which contains a help page. ] } else if (arg.equals(" Help Page")) { } else if (arg.equals("BrowserControl")) {
0
8432
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8343
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8855
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8545
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6185
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4179
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2762
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1986
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1743
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.