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