TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
knonk knonk
NA
1
0
Is this bug of DocumentText in webbrowser control ?
Jan 4 2010 1:23 PM
Hi, Im using webbrowser control in C# to display content, and I used pasteHTML to change the content of webbrowser control when user clicked on a button, code looks like this :
CODE
public
void
OnClickButton1
(
object
sender
,
EventArgs
e
)
{
IHTMLDocument2
htmlDocument
=
browser1
.
Document
.
DomDocument
as
IHTMLDocument2
;
IHTMLSelectionObject
currentSelection
=
htmlDocument
.
selection
;
if
(
currentSelection
!=
null
)
{
IHTMLTxtRange
range
=
currentSelection
.
createRange
()
as
IHTMLTxtRange
;
range
.
pasteHTML
(
"<b> Text is inserted by pasteHTML method</b>"
);
range
.
collapse
(
true
);
range
.
select
();
}
}
But when I get text from browser1 control by this code :
CODE
string
documentText
=
browser1
.
DocumentText
;
It dosen't exist string "<b> Text is inserted by pasteHTML method</b>" in documentText variable !
Anyone can explain why for me, please ? and How can I get that document text which is inserted dynamic by pasteHTML(..) method at runtime ?! thanks alot.
Reply
Answers (
0
)
print listbox in c#
About font