Search - Articles
DevASP.NET for ASP.NET, VB.NET, XML and C# (C-Sharp) Developers Tuesday, March 03, 2009
Dev Articles
Search Directory
ASP.NET
VB.Net
C-Sharp
SQL Server
 

Back” and”Forward” buttons of Web Browser Control using C# .net 2.0

Author: Zunnair
Download Source Code : 816_Back Forward.zip

In this simple article you will learn that how to make “Back” and ”Forward” buttons of Web Browser Control.

 Create new c# project. Drag one Textbox control, Label, Web Browser control, and three buttons on the windows form.

·         One button will use for loading page which I have discuss in one of my previous articles.

·         Other two buttons will be used to go back on previous and next page from the existing page.

Now write the following code on Form Load event:

C#

private void LoadForm_Broswer(object sender, EventArgs e)

        {

            this.Text = "DevAsp WebBrowser Application";

            this.txt_Url.Text = "www.devasp.net";

            wbBrw.Navigate(txt_Url.Text);

        }

VB

Private Sub LoadForm_Broswer(ByVal sender As Object, ByVal e As EventArgs)

        Me.Text = "DevAsp WebBrowser Application"

        Me.txt_Url.Text = "www.devasp.net"

        wbBrw.Navigate(txt_Url.Text)

    End Sub

Now write the following code on Button Click event:

For back button:

C#

private void btn_Back_Click(object sender, EventArgs e)

        {

            wbBrw.GoBack();

        }

VB

 

Private Sub btn_Back_Click(ByVal sender As Object, ByVal e As EventArgs)

        wbBrw.GoBack()

    End Sub

For forward button:

 

C#

private void btn_Forward_Click(object sender, EventArgs e)

        {

            wbBrw.GoForward();

       }

VB

 

Private Sub btn_Forward_Click(ByVal sender As Object, ByVal e As EventArgs)

        wbBrw.GoForward()

    End Sub

 

This is the simple code for adding back and forward buttons in web Browser control application.

Article Comments
I was overwhelmed after looking the coding of undo, redo and back forward.The languaze of coding was too easy to understand

Posted on 2/3/2009 1:07:27 AM by Prashant Trivedi

code for back and forword button

Posted on 11/9/2009 12:52:46 AM by Vilas Temgire

Hi Vilas,

Source code is attached with article...Please review that.

Posted on 11/9/2009 4:46:19 AM by zunnair

hello , im new to this forum/blog thing. its a special place full of good info :)

Posted on 1/21/2010 3:53:04 AM by Smecypebymn

Hi all,

my friend told me about this forum so i decided to sign up.

hopefully i can participate in some lively discussions here!

looking forward to talking to you all. :)

Posted on 2/12/2010 8:31:20 AM by WesOredezeK

Hi all,

my friend told me about this forum so i decided to sign up.

hopefully i can participate in some lively discussions here!

looking forward to talking to you all. :)

Posted on 2/14/2010 2:56:50 AM by WesOredezeK

Hey. New here and figured I should post and say hi.

Posted on 6/5/2010 1:12:41 PM by braitorry

Welcome to this community :-)

Posted on 6/7/2010 4:48:09 AM by zunair

hi i am new here just wana say hi to all members

Posted on 8/20/2010 7:51:26 AM by starringmoviesm

I'm so happy to find this forum... Just wanted to drop by and say Hi and I'm looking forward to all the great discussion I will have with you guys!

Posted on 8/20/2010 8:51:27 AM by marketingelf fm

Your Daily Technology Source

Posted on 10/28/2010 6:38:44 PM by AllAboutTech

i am very glad

Posted on 10/30/2010 1:16:44 PM by Nixon

   
Add Article Comment:
Name :
Email Address :
   
Comments :
 
   
<< Color Dialog Component (control) in C# .net 2.0

Disclaimer - Privacy
© 2002-2017 DevASP.net