• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 475
  • Last Modified:

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?
0
canuckconsulting
Asked:
canuckconsulting
  • 2
1 Solution
 
Easwaran ParamasivamCommented:
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
 
canuckconsultingAuthor Commented:
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
 
Easwaran ParamasivamCommented:
0

Featured Post

Receive 1:1 tech help

Solve your biggest tech problems alongside global tech experts with 1:1 help.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now