I have a JavaScript that generates HTML on my web page (AJAX control). Now I need to create a ASP.NET Control that is visible at design time. It should look exactly like the original AJAX control. Any ideas about how to execute JavaScript at design time? Unfortunately I cannot create all the required HTML in .Net as it is too large and complex.
Here is the possible solution:
- Create an invisible WebBrowser control provided with Windows Forms.
- Load and execute JavaScript inside WebBrowser control.
- Extract generated HTML.
- Render extracted HTML on web page.
Are there any better approach?