Outside XAML, HTML Document Object Model on .NET Form

xiaoxiao2021-03-06  39

Outside XAML, HTML Document Object Model on .NET Form

Author: liang bo

Brianliangx@hotmail.com

We want an application's UI to be edited at runtime, so that it can be performed at any time. Microsoft uses XAML in the longhorn programming model to provide a description mechanism for user interfaces, but now HTML web pages also have such features. Compared to traditional Windows Form, the web page is more beautiful, colorful, dynamic, of course, we don't just need beauty, we have to make the web page can interact together with other parts of the window, and there is no different window control.

Before reading this article, the author wants you to have the following technical foundation: (1) Be familiar with at least one .NET language (2) There are some understanding of the webpage, and can use tools such as FrontPage or Dreamweaver production [this is not required, even You are not familiar with the web production, maybe someone in your friend is fine in this way] (3) JavaScript or vbscript scripting base [This is not required, you can refer to the code example of the article to write them]

Finally, you need to get TZ Web-Style Form Control controls. It provides an extended document object model that helps developers get the host window object of the browse page, and call the method, pass the parameters. You can also replace the right-click menu of the web page using the application's right-click menu to keep the application's style consistent. You can download this control here:

http://www.appTemplate.com/downloads/tzwbc.asp

1. Transfer parameters to .NET FORM using the HTML control

Let's make a simple web page, use TZ Web-Style Control to browse it, and fill the Form window as the user interface. In addition to the background image, we

(1) Add two single-line text box controls in the web page, named TXTMSGTITLE, TXTMSGCONTENT, and the code is as follows:

Name = "Button2" Language = "JavaScript" οnclick = "Return Button2_onclick ()">

(2) Add the following code in the tag of the HTML file: