- Beginning C# 7 Hands-On:Advanced Language Features
- Tom Owsiak
- 135字
- 2021-07-02 15:29:20
Adding a summarize button to the HTML
Bring up a project. In the basic HTML, delete the <div> lines, as you won't need them. Now, let's add a button. The only thing the button will do is to summarize some information for us.
Go to Toolbox and grab a Button control. Drag and drop it below the line beginning with <form id=..., and change the text on the button to say Summarize. Now, close this with a <br> tag and keep the Label control as usual.
Now, go to Default.aspx, and enter the Design view. You'll see one button for the interface, which says Summarize and looks like Figure 4.4.1:

Figure 4.4.1: The simple interface for this project
Now, double-click on the Summarize button. This takes us into Default.aspx.cs. Delete the Page_Load block. Your initial code screen for this project should look like Figure 4.4.2:

Figure 4.4.2: The initial Default.aspx.cs code for this project
推薦閱讀
- Raspberry Pi for Python Programmers Cookbook(Second Edition)
- Mastering Entity Framework Core 2.0
- C語言程序設計實踐教程(第2版)
- Mobile Application Development:JavaScript Frameworks
- C++面向對象程序設計(微課版)
- Scala Design Patterns
- AngularJS Web Application Development Blueprints
- Django Design Patterns and Best Practices
- Oracle BAM 11gR1 Handbook
- 軟件架構:Python語言實現
- Vue.js應用測試
- Everyday Data Structures
- SQL Server 入門很輕松(微課超值版)
- Go語言編程之旅:一起用Go做項目
- 匯編語言程序設計教程