Solved

Insert HTML List header in windows forms WebBrowser document

Posted on 2011-09-10
3
421 Views
Last Modified: 2013-12-17
I have a .Net 4 Windows Forms project with Visual Studio 2010 using c#.

I have a WebBrowser control on the form and can add an HTML list to the document using the method:
Document.ExecCommand("InsertUnOrderedList", false, null);

Open in new window

What I need to do is have a list header <LH> added to this list.  How can I do this?
0
Comment
Question by:canuckconsulting
  • 2
3 Comments
 
LVL 16

Expert Comment

by:Easwaran Paramasivam
Comment Utility
You can use simple javascript to achive this instead of Document.ExecCommand().

<ul style="YourStyle">
<LH>Your List Header</LH>
<script type="text/javascript">
foreach (something)
{
document.write('<li>'+something+'<\/li>')
}
</script>
</ul>
0
 

Author Comment

by:canuckconsulting
Comment Utility
I'm doing this in a c# program though...creating and modifying the document on the fly.  I think i need to modify it using the document object as opposed to Javascript?
0
 
LVL 16

Accepted Solution

by:
Easwaran Paramasivam earned 500 total points
Comment Utility
0

Featured Post

Better Security Awareness With Threat Intelligence

See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

Join & Write a Comment

Suggested Solutions

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
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…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

743 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now