Click here to Skip to main content
11,632,715 members (88,929 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
I have a webBrowser control named webBrowser1.
When in debug mode, it have its default properties, and one of its default property is to "Open [a] link in New window". I want to change in code to open that link in the same window(not in new window as in default mode).
To summarize:
How to reset the default "Open link in New window" property, and make it "open link in the same window"?

And please, forgive me because I am not so good in expressing these things as it should, my level as programmer is not very good, and my english is not so advanced! If you will not understand something, just ask and I will add details as we go.
Posted 7-Feb-12 11:41am
_Q12_1.5K
Edited 9-Feb-12 13:10pm
v3
Comments
Orcun Iyigun at 7-Feb-12 17:51pm
   
I think when you are opening a new url, you can use Navigate() method to do this. Have you tried it?
SAKryukov at 7-Feb-12 19:45pm
   
Unbelievable!
Nobody complained about you English, but I asked to specify the type of webBrowser1. You did not do it! There is no this type even now!

There is no such type -- "webBrowser". And "WebBrowser" is not a type -- this is a name of at least two different types.

Tell us what is that type.
--SA
_q12_ at 7-Feb-12 22:08pm
   
for SAKryukov:
"""And please, forgive me because I am not so good in expressing these things as they are""" (but in general I make myself understood by the others who have a bit of good will; in the end,the idea matters, not the content of how its formulated), why are you so mean with me?
And really, I am over it, go ahead and downvote everything, but for you to know, you are not helping.
SAKryukov at 9-Feb-12 13:14pm
   
Look at what are your talking!

You say a lot of irrelevant stuff, and all is based on ambitions, but the business. What are your brain is busy with?

Telling I'm not not helping is a plain rude lie -- just look at my posts. And I don't like it.

After all you words, you failed to answer my simple question: tell me exact type of "webBrowser". This is all you had to tell so I could help you.
And how do your think I can vote your questions if you do not provide essential information and ignore my questions? Perhaps also reporting you for abuse... But this is not what I want; I want to help; but you are not giving me a chance.

You are literally the enemy of yourself. How anyone can help you if you are not helping yourself?

So, last chance. Please tell me the type of "webBrowser".
--SA
_q12_ at 9-Feb-12 18:52pm
   
the type of WebBrowser control = WebBrowser.
If you don't like how(or what) I speak, don't listen. Put me on your ignore list. Avoid my posts please.
Just don't downvote my entries anymore. I am not upset on you personally, or what you say (or said), I am upset on your attitude, !downvoting! my every entry I put here(even I asked you not to do so[in the past]). I use this site as a tool for my benefit - to learn something(like everybody else here -advanced or not!-).
I need straight answers not convoluted ones. This is my reason for visiting this forum. This is how I personally learn something.

"This type of attitude and responses, by both, have no place here." - as crystal clear someone told us both in a previous disagreement. So kindly I ask you, not to respond to [this entry] or [any other one] I post in the future. Let others to do it. I hope, I have this right not letting someone to respond to my questions, am I right?
This is a public page, I write here because I did not find a way of sending you a private message. This was not my intention, usually I take the human at a drink and settle with it what it is to settle in particular,not in public.
Don't take it personally because is not my intention.
I want to remain your favorite friend!
SAKryukov at 11-Feb-12 18:03pm
   
No, you still did not specify its type.

You don't listen.

You are ignorant and rude. I down-vote some of your posts only because they are abusive. If you want to keep to the personal matter instead of focusing on personal matters, I'll just have to report you as an abuse or spammer (depending on how much you want to do this).

If someone is asking your question to clarify your question, be so kind to answer. You need the answer, so you are the most interested person.

Look at yourself -- you fail to tell use the type of the control 3 time. Or more. If you don't know what is the type, please read some language manual.

WebBrowser is not the type. This is the name of more than one different types.
You simply need to tell us which one.

--SA
SAKryukov at 11-Feb-12 18:08pm
   
Also, please let me decide what posts to ignore. Your request is just rude.

I'm not going to ignore your post. You should either learn some basics of behavior on the forum or go by yourself. You are virtually spamming the forum, and, by the way, at the expense of people who deserve more help, by drawing our time in vain. This is not fair to those people.

As you say: "Don't take it personally because is not my intention. I want to remain your favorite friend!"

Sure, this is the best we can do.

Best regards,
--SA
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 2

If you are using WebBrowser control of WindowsForms library, then you can use navigate property to open a URL in the WebBrowser control, without creating a new window, as below
this.webBrowser1.Navigate("http://www.CodeProject.com");
  Permalink  
Comments
SAKryukov at 9-Feb-12 13:18pm
   
That is correct, my 5, but I'm very frustrated that OP still did not share with us the exact type of webBrowser1. The answer is only possible because this method is the same in WPF and Forms.
--SA
ProEnggSoft at 9-Feb-12 19:31pm
   
Thank you SAKryukov for the upvote
Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

I suspect very strongly that the properties you get, are the ones set for IE on a global basis, given that you're running IE in a window, basically.

Playing with the IE control is not really a great way to learn programming, you'd do better to buy a book and work through it, or write basic apps that replace things like the calculator and notepad.
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 8,498
1 Sergey Alexandrovich Kryukov 8,149
2 Mika Wendelius 6,260
3 F-ES Sitecore 2,321
4 Suvendu Shekhar Giri 1,995


Advertise | Privacy | Mobile
Web04 | 2.8.150728.1 | Last Updated 9 Feb 2012
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100