- Beginning C# 7 Hands-On:Advanced Language Features
- Tom Owsiak
- 255字
- 2021-07-02 15:29:25
Adding a box and a Find Max button to the HTML
Bring up a project, and we will set up a box, read three values from this box, and then find the maximum value. We'll also do some other things such as learning how to convert from an array of one data type to another.
Let's begin by typing Enter Values: under the line beginning with <form id=...:
Then, go to Toolbox, grab a Textbox control, and put that after Enter Values:. You can delete the <div> lines as you don't need them. Be sure to insert a <br> tag at the end of the line:
Enter Values:<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox><br />
In the next stage, you'll insert a Button control; so get one from the Toolbox and drop it below this line. Change the text on the button to say Find Max. Again, end the line with a <br> tag:
<asp:Button ID="Button1" runat="server" Text="Find Max" /><br />
Your HTML file for this project should look like Figure 7.2.1:

Now go to the Design view. All that we now have is a box and a button, as shown in Figure 7.2.2:

Next, double-click on the Find Max button to go to the Default.aspx.cs file, and delete everything. The code in this chapter will be somewhat sophisticated and perhaps a little more challenging than that of previous chapters, but it's the best way to grow and move forward. I will go through the construction of the code line by line. By now, you should be able to see what it takes to begin to program well and how much you have to know.
- Android應(yīng)用程序開發(fā)與典型案例
- LabVIEW Graphical Programming Cookbook
- 軟件項(xiàng)目管理(第2版)
- Blender 3D Incredible Machines
- FPGA嵌入式項(xiàng)目開發(fā)實(shí)戰(zhàn)
- Learning Nessus for Penetration Testing
- OpenCV Android開發(fā)實(shí)戰(zhàn)
- 從零開始學(xué)UI:概念解析、實(shí)戰(zhàn)提高、突破規(guī)則
- 百萬在線:大型游戲服務(wù)端開發(fā)
- R High Performance Programming
- Python編程零基礎(chǔ)入門
- iOS應(yīng)用逆向工程:分析與實(shí)戰(zhàn)
- Building an E-Commerce Application with MEAN
- Building RESTful Web Services with PHP 7
- Real Time Analytics with SAP HANA