---
title: "WebBrowser Control in C#.Net"  
description: "WebBrowser Control Enables to navigate Web pages inside your form. Navigate method of WebBrowser Control - Loads the document into the WebBrowser cont"  
author: "John Smith"  
published: 2011-01-24  
updated: 2020-09-17  
canonical: https://www.mindstick.com/articles/412/webbrowser-control-in-c-sharp-dot-net  
category: "c#"  
tags: ["c#"]  
reading_time: 2 minutes  

---

# WebBrowser Control in C#.Net

## WebBrowser Control in C#.Net

A WebBrowser Control Enables to navigate [Web pages](https://answers.mindstick.com/qa/95530/how-do-i-fix-safari-not-loading-web-pages) inside your form. Navigate method of WebBrowser Control - Loads the document into the WebBrowser control.\

## How to use WebBrowser Control

[Drag and drop](https://www.mindstick.com/forum/454/how-to-drag-and-drop-multiple-image-from-one-canvas-to-onther-canvas-in-html5) WebBrowser Control from the toolbox on [window Form](https://www.mindstick.com/forum/527/how-to-pass-datagridview-s-cells-value-to-another-window-form).

![WebBrowser Control in C#.Net](https://www.mindstick.com/mindstickarticle/bd89779f-66e6-4497-94ee-de2821473e7a/images/54a72299-f4c2-49c5-838d-9c826eee989d.png)

## Designing GUI

Now I add a label, TextBox, and a button.

![WebBrowser Control in C#.Net](https://www.mindstick.com/mindstickarticle/bd89779f-66e6-4497-94ee-de2821473e7a/images/0023e885-6113-4e0f-8b75-e8f2f72267db.png)

## Code:

Write below code in a [button click](https://www.mindstick.com/forum/568/check-condion-before-post-page-on-button-click-in-jquery-or-javascript).

![WebBrowser Control in C#.Net](https://www.mindstick.com/mindstickarticle/bd89779f-66e6-4497-94ee-de2821473e7a/images/4cd8333f-310f-4eff-8b29-fba3f6422f4f.png)

[Double click](https://www.mindstick.com/forum/156225/differentiate-between-google-adword-and-double-click) on [Click event](https://www.mindstick.com/forum/424/how-to-call-form_paint-event-on-button-click-event).

```
private void btnGo_Click(object sender, EventArgs e){         //The Navigate method of browser control views a page in the viewer.           webBrowser1.Navigate(textBox1.Text);}
```

**Run the project**

![WebBrowser Control in C#.Net](https://www.mindstick.com/mindstickarticle/bd89779f-66e6-4497-94ee-de2821473e7a/images/0023e885-6113-4e0f-8b75-e8f2f72267db.png)

When you enter URL address in textbox and click the Go button then click event will fire and navigate method will open a [website which URL](https://www.mindstick.com/articles/527/grid-control-in-wpf) address is given in TextBox.

![WebBrowser Control in C#.Net](https://www.mindstick.com/mindstickarticle/bd89779f-66e6-4497-94ee-de2821473e7a/images/b96df04b-ad45-46a9-9695-22aeba47b1b5.png)

**WebBrowser [Properties](https://yourviews.mindstick.com/view/81845/now-it-s-possible-to-predict-properties-of-any-molecule)**

**The URL [property](https://www.mindstick.com/articles/198559/an-ownership-of-property-in-hua-hin):** Gets or sets the URL of the current [Web page](https://answers.mindstick.com/qa/92898/how-to-create-a-web-page-using-bootstrap-4). Setting this property navigates the control to the new URL.

**AllowNavigation:**Gets or sets a value indicating whether the control can navigate to another page after its initial page has been loaded.

**TabStop:** Gets or sets a value indicating whether the user can give the focus to this control using the TAB key.

---

Original Source: https://www.mindstick.com/articles/412/webbrowser-control-in-c-sharp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
