18 July 2007
HtmlElement js = HtmlPage.Document.CreateElement("script");
js.SetProperty("text", "alert('This is an alert box, injected from managed code!')");
HtmlElement body = HtmlPage.Document.GetElementsByTagName("body");
There are some other slick ways to evaluate code from managed code, but I'll save that for another day.
Hope this helps![/RAW]
Jeff Wilcox is a Software Engineer at Microsoft in the Open Source Programs Office (OSPO), helping Microsoft engineers use, contribute to and release open source at scale.