Link to home
Start Free TrialLog in
Avatar of canuckconsulting
canuckconsultingFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Insert HTML List header in windows forms WebBrowser document

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?
Avatar of Easwaran Paramasivam
Easwaran Paramasivam
Flag of India image

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>
Avatar of canuckconsulting

ASKER

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?
ASKER CERTIFIED SOLUTION
Avatar of Easwaran Paramasivam
Easwaran Paramasivam
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial