Click here to Skip to main content
15,905,148 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to refresh the current web page. I am using Win 7, iExplorer. I tried this but I am missing something. Any help is appreciated. Thank you.

C++
public ref class WebBrowser1 : public WebBrowserBase
if (  !this->WebBrowser1->Url->Equals( "about:blank" ) )
{
this->WebBrowser1->Refresh();
}
}
Posted

1 solution

Try this :
C++
public:
virtual void Refresh() override

// Reloads the current page.
void ButtonRefresh_Click( System::Object^ /*sender*/, System::EventArgs^ /*e*/ )
{

   // Skip refresh if about:blank is loaded to avoid removing
   // content specified by the DocumentText property.
   if (  !this->WebBrowser1->Url->Equals( "about:blank" ) )
   {
      this->WebBrowser1->Refresh();
   }
}
 
Share this answer
 
Comments
Member 7766180 27-Nov-11 12:38pm    
Thank you. However; I forgot to mention that I have a console app. So I need the refresh to just run.
RaviRanjanKr 27-Nov-11 13:31pm    
My 5+

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



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900