473,322 Members | 1,736 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

WebBrowser Control .Net 2 problems with dynamic HTML string and DocumentText

1
I wanted to avoid any HTML file creation , so initial HTML was formed as a string and assigned to DocumentText.
After that the aim was to manipulate with html using DOM .
It turned out when dynamically adding rows to table

ctable = (mshtml.HTMLTableClass)htable.DomElement;
foreach (T row in table)
{
crow = (mshtml.HTMLTableRowClass)ctable.insertRow(currow+ +);
crow.id = rowId + "_" + row.id ;
crow.onclick = "hilight_row(this,'#ffcc99')";
ccell = (mshtml.HTMLTableCellClass)crow.insertCell(0);
...
}
page updates are dispalyed properly without refreshing DocumentText , but onclick script is not fired unless DocumentText is reassigned again
Now after
DocumentText = updatedHTML

html is shown from the top , whereas the need is to keep the existing location ( I mimic multicolumn tree in html and after expanding a parent row it should stay visible ).

Attempt to introduce anchors and call javascript where

location.href = anchor ;

or anything like

xdoc = xie1.document

xelem2 = xdoc.getElementByID( some_ID )

xelem2.ScrollIntoView


didn't result in successful outcome. Html still on a top. Which probably due to internal initial navigation to about:blank and ignoring further navigation.

Any idea how to overcome this problem and keep only string/Dom manipulations without html file creation.
Apr 18 '07 #1
0 1567

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: myzm | last post by:
Hello there, I use webbrowser loading a web page and want to display the html file in a RichtextBox. I find out that the size of the DocumentText is far less than the actual size of the html...
1
by: iwdu15 | last post by:
ok, this is driving me insane, plz someone help. im attempting to add text to a webbrowser document text by doing as follows, IM is an Instant Message object in the AIM SDK, the line Dim str As...
11
by: Webbert | last post by:
I am trying to display XML in a WebBrowser Control. I receive a data feed of XML and am trying to inject it into the control. I have not been successful in doing so. The only solution I have...
4
by: Steve Richter | last post by:
I would like to build an HTML stream as a string and have the WebBrowser control render that HTML. Then on PostBack, or whatever it is called, I would like my code to be the one that receives what...
0
by: Sin Jeong-hun | last post by:
I've found that if a MessageBox (called by alert/confirm from Javascript) or a web page modeless dialog is popped up, I cannot call Navigate of the WebBrowser control. If I do, a COM exception...
1
by: David Veeneman | last post by:
In .NET 2.0, how do I clear the contents of a web browser control? I'm using a WebBrowser control in a Windows Form app to display strings genrated by my application and formatted as HTML--I'm...
2
by: Zytan | last post by:
I have a WebBroswer control, and I set the HTML it will display via DocumentText, which takes a a string. This shows the HTML code from the string in the control. But, sometimes, the WebBrowser...
2
by: Scott Gravenhorst | last post by:
I recently (within 30 days) downloaded and installed VB 2005 Express. I like it a whole lot... but: I have been trying to work with the WebBrowser control to display a small amount of help text...
7
by: - Electronic.HR - | last post by:
I have very strange and stupid problem with .NEt's webBrowser control... If I do this: ---------------------------------- private void btnGoogle_click(object sender, EventArgs e) { ...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.