Solved

Insert HTML List header in windows forms WebBrowser document

Posted on 2011-09-10
3
424 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
ID: 36520909
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
ID: 36521209
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
ID: 36521287
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Many of us here at EE write code. Many of us write exceptional code; just as many of us write exception-prone code. As we all should know, exceptions are a mechanism for handling errors which are typically out of our control. From database errors, t…
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…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

932 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

17 Experts available now in Live!

Get 1:1 Help Now