Posted 18 July 2007 Tweet
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 Principal Software Engineer at Microsoft in the Open Source Programs Office, helping Microsoft scale to 10,000+ engineers using, contributing to and releasing open source.