tailieunhanh - Beginning DotNetNuke 4.0 Website Creation in C# 2005 with Visual Web Developer 2005 Express phần 10
Những tế bào này bảng tương ứng với vị trí của các bảng trong Hình 11-9. Đẹp, thoáng mát, huh? Nhưng mà là tất cả những thứ màu xanh và hình ảnh thể hiện trong hình 11-8? Hình ảnh này chỉ cho thấy cách bố trí. Hãy nhớ rằng tôi đã nói rằng cái nhìn và cảm nhận được chứa trong file css | 344 CHAPTER 12 JAVASCRIPT AND AJAX should have four event handlers for these controls. Listing 12-1 shows the event handlers with the code for these controls. You will need to add the using directive to the top of your page first. Listing 12-1 . Event handlers for the third cell s controls protected void cmdEnter_Click object sender EventArgs e protected void cmdChange_Click object sender EventArgs e if This Text The Other Text else This Text protected void rb1_CheckedChanged object sender EventArgs e Clear the list then add item according to this radio button First 1 rb First 2 rb First 3 rb First 4 rb First 5 rb protected void rb2_CheckedChanged object sender EventArgs e Clear the list then add item according to this radio button Second 1 rb Second 2 rb Second 3 rb Second 4 rb Second 5 rb You can see that the first cell s Enter button changes the text background and color. This is a common thing to do when validation of the text entry signifies an error. The second button event handler changes the text in the button. You did this for the three time punch projects. The last two radio button event handlers fill the drop-down list with different choices. This kind of thing is also common in web pages. Compile and run the code. Click the second cell s button and you will see the text change. The size of the button will also change to accommodate the text. CHAPTER 12 JAVASCRIPT AND AJAX 345 Type something in the first cell s text box and press its button. The background color of the text box will change to red. If you click the radio buttons you will see the list change values. This page is shown in Figure 12-3. Server Text Box Server B
đang nạp các trang xem trước