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 on the Azure team.
Jeff has been at Microsoft since 2005 and holds a Bachelor of Science from the University of Michigan. Jeff lives in downtown Seattle.