Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.

  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 8: The WebBrowser Control > Using a WebBrowser Control to Display Dynam...

Using a WebBrowser Control to Display Dynamic Content

Suppose a user enters “Ford” in the text box of your photo-browsing application. Unless you query the user, you won't know whether the user meant to search for “Ford Mustang” or “Ford F-150.” One way to find out would be to create a page with HTML markup and display it to the user, asking for more information. You could then save the generated file to Isolated Storage and load it using the technique described in the previous section. But that would certainly be a cumbersome approach for such a simple task. Luckily, there's a much easier way to show a dynamically generated HTML page, using the NavigateToString method of the WebBrowser control. This method takes a single argument—a string—that contains the complete HTML code needed to display the page in the WebBrowser control. The next demo shows just how easy it is to use this method.


  

You are currently reading a PREVIEW of this book.

                                                                                                                    

Get instant access to over $1 million worth of books and videos.

  

Start a Free Trial


  
  • Safari Books Online
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint