Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get a reference to my selected divelement

Status
Not open for further replies.

ganjafarmerIT

Programmer
Jun 29, 2004
30
0
0
NL
Hi guys it's me once again, struggeling with a dammned html editor. I can't figure out how to create a reference to the htmlelement that's being selected.

How is it that you can only use mydocument.selection to create a textrange so you can use it to edit the selected text?

<Code>
Dim myHtmlDivelement As HTMLDivElement = DirectCast(myDocument.selection, HTMLDivElement)
</Code>

If I do this it just give me a stupid invalid cast error. I'm really lost right now lol. Just can't figure out which direction to search anymore:S
 
What are you using vb.net 2005? asp.net?

perhaps divelement is used for html <div></div> elements only.

Christiaan Baes
Belgium

If you want to get an answer read this FAQ faq796-2540
There's no such thing as a winnable war - Sting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top