473,503 Members | 756 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

new webpage in same window

5 New Member
Good day
I am writing code to open every page in internet explorer and every page will be in new tab but my code open every page in separate window
could plz help me :)
I am using c#
Expand|Select|Wrap|Line Numbers
  1. using System;
  2. using System.Collections.Generic;
  3. using System.ComponentModel;
  4. using System.Data;
  5. using System.Drawing;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Net;
  9. using System.IO;
  10.  
  11. using System.Windows.Forms;
  12.  
  13. namespace RequestURLWeb
  14. {
  15.     public partial class Form1 : Form
  16.     {
  17.         public Form1()
  18.         {
  19.             InitializeComponent();
  20.         }
  21.  
  22.         private void button1_Click(object sender, EventArgs e)
  23.         {
  24.             String url = textBox1.Text;
  25.             HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url);
  26.             HttpWebResponse respo = (HttpWebResponse)req.GetResponse();
  27.  
  28.             System.Diagnostics.Process proc = new System.Diagnostics.Process();
  29.             proc.StartInfo.FileName = "iexplore";
  30.  
  31.             proc.StartInfo.Arguments = url;
  32.             proc.Start();
  33.             System.Diagnostics.Process();
  34.  
  35.  
  36.  
  37.  
  38.  
  39.         }
  40.  
  41.         private void Form1_Load(object sender, EventArgs e)
  42.         {
  43.  
  44.         }
  45.  
  46.         private void richTextBox1_TextChanged(object sender, EventArgs e)
  47.         {
  48.  
  49.         }
  50.     }
  51. }
  52.  
Oct 17 '12 #1
1 2250
Rabbit
12,516 Recognized Expert Moderator MVP
That's because you're creating a new process each time. Instead you should create an internet explorer object and use the API for it.
Oct 18 '12 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

8
15099
by: Renuka | last post by:
I have a confirmation page with an OK button. If this window has an opener then this browser window needs to go to another URL or else the window must close. Thus I have the following javascript...
3
21024
by: Simon Wigzell | last post by:
I just want my form target to be another page but open it in the same window. Here is my code for the 2 pages : -------------------------------form1.htm------------------------------------...
1
1458
by: Danny | last post by:
hi, lately i've been working on a website and i have used a bit of javascript although i'm not an expert in this mather. On the page there are 3 thumbnails and when you click on a thumbnail a...
8
2023
by: Kim14 | last post by:
Help! I am trying to create a webpage and it would be obvious to anyone who reads my source code (it's a mess) that I created it using a template. I know almost nothing about webpages, but am...
5
36104
by: gil | last post by:
I have a form that I would like to get the values entered on the page and go to a new page in the same window. I can make the code work to open a new window, but I need it to open in the same...
0
1243
by: Husam | last post by:
Hi EveryBody: I got this decleration from msdn documntation which is: object.Navigate( _ url As String, _ _ _ _ )
8
1891
by: lli | last post by:
Hi Guys, I have designed a web application. In its one window I put a form. User can click submit button of this form to run a pathon script to get data from database. Then User get a new window...
0
1107
by: =?Utf-8?B?cGVsbGk=?= | last post by:
I create a bookmark of a folder in Windows Explorer and save in my Links folder. When I click the link from the link bar, it is opened in a new window. When I open the link from...
1
1208
by: mandarchalke29 | last post by:
Can anybody please tell me how do i set the message in the same IFRAME? I have created different windows for different users in which the url of the windows is the same. I have created IFRAMES and...
1
1488
by: akiran80 | last post by:
Hi All, iam using IE 6 with SP2 patch. when am tryig to open text(spreadsheet format data) it is opening in same window. expected behaviour is it should ask for open or save option once iclick...
0
7203
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
7089
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
7282
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,...
0
7339
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...
1
6995
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
5581
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5017
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...
0
3157
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
389
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...

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.