Copy html to clipboard

G

Guest

Hi,

I want to copy hyperlink to clipboard with Clipboard object.
It's working well with text, but not with HTML.

Text:

Clipboard.SetDataObject("Test")

HTML:

Dim clipDO As New DataObject = DataFormats.Html,
"<HTML><BODY>TEST</BODY></HTML>")
Clipboard.SetDataObject(clipDO, True)

Thank you
 
G

Guest

Hi,

I think it might be working for you the way it is (I tried the same example
with a TEST HTML so I could distinguish between TEST and TEST HTML ) - its
just that most applications don't recognize the html format on the clipboard
(can't paste into notepad, or even into visual studio.net html file UNLESS
you are viewing the DESIGN mode of an html page, then it pastes fine (I was
supprised that I couldn't use 'paste special' in MS Word - it seemed to know
there was html on the clipboard, but did not paste it..)
 
G

Guest

Hi,

It works very well in a windows form but how can i do the same in an aspx.
Thank you
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top