Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8554447
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T14:53:04+00:00 2026-06-11T14:53:04+00:00

This is what I have: public void initiate(WebBrowser browser) { browser.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(refDocumentCompleted);

  • 0

This is what I have:

public void initiate(WebBrowser browser)
{         
   browser.DocumentCompleted += new WebBrowserDocumentCompletedEventHandler(refDocumentCompleted);
   // navigate browser to the referal Uri
   browser.Navigate(refreral);

   browser.DocumentCompleted -= refDocumentCompleted;
   //remove here so that it doesn't do this everytime a document is completed, i want it just in this method
}

private void refDocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e)
{
    // want to call navigate method on browser here. but Its out of scope.
}

What I would like it to do is, navigating to referral, then once that is loaded navigate to another page stored as a global string in the class.

I’m sure my trouble here is from a poor understanding of how events work, I’ve tried to read up on it, but can’t seem to get my head around it but don’t think I need to create my own handler.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T14:53:05+00:00Added an answer on June 11, 2026 at 2:53 pm

    You already have the webbrowser object. You just need to cast it:

    ((WebBrowser)sender).Navigate(...);
    

    etc.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this test [Test] public void SaveInventoryItemLoad_Will_Call_WCF_Service_SaveInventoryItemLoad() { adapter.SaveInventoryItemLoad(new List<InventoryItemLoadProxy>()); itemMasterBusinessClientMock.Verify(x => x.SaveInventoryItemLoad(It.IsAny<List<InventoryItemLoadProxy>>()),
I have this code: hubSpinner.setOnItemSelectedListener(new OnItemSelectedListener() { public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int
I have this Public void CreateUser(params here) { CreateMembership(params here); Users newUser = new
I have this class: public MyClass { public void initialize(Collection<String> data) { this.data =
I have this method: public void testJSNI2(){ String x = test; } I can
i have this thread: public void run() { try { while(isThereActivityRunning()) { results =
Lets say I have this code: public void MyMethod(string Data, List<string> InputData) { //I
I have this code: @Override public void onSurfaceCreated(GL10 gl, EGLConfig config) { GLES20.glClearColor(0, 0,
I have this code: //choosed a picture public void onActivityResult(int requestCode, int resultCode, Intent
i have this thread which run as a service: public void run() { try

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.