Solved

C# HtmlHistory and Favorites

Posted on 2006-06-22
7
587 Views
Last Modified: 2008-02-26
Hi!

I have an urgent project that I am working on that incorporates the web browser control. To finish this element I need to get both the favourites bar and history info working. I figure the HtmlHistory class will solve my history problems but can't get it to work. Should I be instantiating or creating my own class first?
Next is the favourites bar. I have access to an SQL server which I intend to use for storing links but can't figure out how I can allow the user to create sub folders. Is there an easier solution? Perhaps something similar to HtmlHistory.

Any help would be greatly appreciated. If you can't tell I am fairly new to C#.

Thanks

John Walden
0
Comment
Question by:johnwalden869050
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
7 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 16962073
1) What have you tried so far with the HtmlHistory?

2) Are you getting any exceptions?

Bob

0
 

Author Comment

by:johnwalden869050
ID: 16962192
Bob,

Just figured it out. I was being a bit dumb - its been a long day :-)

The code that it is working with is:

        private void ListHistory()
        {
            string History;
            HtmlHistory hh;
            hh.(whatever i need)
        }

At least I think this is going to work!

Thanks all the same. Do you have any ideas on the favourites ???

Cheers,

John
0
 

Author Comment

by:johnwalden869050
ID: 16962243
Scap that! Still dosen't work.

To answer your question...

I have tried the usual... HtmlHistory hh = new HtmlHistory(); -  Error: The type 'System.Windows.Forms.HtmlHistory' has no constructors defined
Also I have made my own class using the syntax from MSDN ... public sealed class HtmlHistory : IDisposable - No Joy.
And finally the one above.

All the best

John
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 96

Accepted Solution

by:
Bob Learned earned 450 total points
ID: 16962501
1) This was fun to find an answer for:

  The constructor for HtmlHistory is sealed, so it needs to be accessed from some other class within the framework

2) I found this:
   
  this.webBrowser1.Document.Window.History;

3) There isn't anything similar for Favorites that I know of, but with Windows you can look in the configured Favorites folder for the files.

Bob
0
 
LVL 7

Assisted Solution

by:levyuk
levyuk earned 50 total points
ID: 16964041
Aren't favorites simply shortcuts to web addresses which are stored in the PC. I don't think you could do this simply by using a database and would advise against it especially with your idea of using sub folders. It would be much easier if you stored the favorites in a file on the local computer. Maybe you could store them in an XML file so that they can be used on any machine and in any application. Would make transport of favorites easier.

Just some ideas, hope they help

Jon
0
 

Author Comment

by:johnwalden869050
ID: 16966909
Bob, Jon

Thanks for that Bob - it works perfectly! 450 Points awarded.

Jon...

I had already considered the XML theory but don't have any experience creating or even reading from XML. I was hoping to avoid it but it looks like I will just have to grin and bear it!

Thanks for your input - 50points.

Regards

John
0
 

Author Comment

by:johnwalden869050
ID: 16967315
Hi!

One last thing, I know the question is closed...

Any suggestions on how I can get the drop down list to populate for the history buttons. HtmlHistory doesn't offer any avenues...

Regards

John
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
NetCrunch network monitor is a highly extensive platform for network monitoring and alert generation. In this video you'll see a live demo of NetCrunch with most notable features explained in a walk-through manner. You'll also get to know the philos…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question