HtmlEditor :  Phorum 5 The fastest message board... ever.

This is the discussion forum for the HtmlEditor. See also the HtmlEditor home page, where you can download the control, and the Documentation Wiki, a collaborative project for documenting the control.

Goto Thread: PreviousNext
Goto: Forum ListMessage ListNew TopicSearchLog In
Img. Cannot init the src attirb
Posted by: Alexander (---.35.117.87.donpac.ru)
Date: Wednesday, 27-May-2009, 09:54:51

I am trying to add an image element into Html-document. The code, that do it is the follows:

IHTMLDocument2 doc = ((IHTMLDocument2)_htmlText.Document);
IHTMLImgElement i = (IHTMLImgElement)(doc.CreateElement("img"));

IHTMLDOMNode nd = (IHTMLDOMNode)i;
IHTMLDOMNode parent = (IHTMLDOMNode)_htmlText.CurrentElement;
parent.appendChild(nd);
Uri adr = new Uri(value);
((IHTMLImgElement)_Element).src = adr.AbsoluteUri;

After this code worked, the scr attribute is null. What is wrong? Help, please.



Your Name: 
Your Email: 
Subject: 
Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically.
cxYEM
This is a moderated forum. Your message will remain hidden until it has been approved by a moderator or administrator
This forum powered by Phorum.