Đang chuẩn bị liên kết để tải về tài liệu:
ASP.NET 4 Unleased - p 26

Đang chuẩn bị nút TẢI XUỐNG, xin hãy chờ

witchViewByIndex-Nguyên nhân các MultiView để kích hoạt chế độ xem theo quy định của CommandArgument nút điều khiển của. Bạn có thể sử dụng các lệnh này với bất kỳ nút điều khiển-Button, LinkButton, và ImageButton-bằng cách thiết lập tài sản CommandName nút điều khiển và, trong trường hợp của các SwitchViewByID và SwitchViewByIndex, bằng cách thiết lập thuộc tính CommandArgument. | 224 CHAPTER 4 Using the Rich Controls SwitchViewBylndex Causes the MultiView to activate the view specified by the button control s CommandArgument. You can use these commands with any of the button controls Button LinkButton and ImageButton by setting the button control s CommandName property and in the case of the SwitchViewBylD and SwitchViewBylndex by setting the CommandArgument property. The page in Listing 4.18 illustrates how you can use the NextView command to create a multipart form. LISTING 4.18 MultiViewForm.aspx @ Page Language C DOCTYPE html PUBLIC - W3C DTD XHTML 1.0 Transitional EN http www.w3.org TR xhtml1 DTD xhtml1-transitional.dtd script runat server protected void View3_Activate object sender EventArgs e lblFirstNameResult.Text txtFirstName.Text lblColorResult.Text txtColor.Text script html xmlns http www.w3.org 1999 xhtml head id Head1 runat server title MultiView Form title head body form id form1 runat server div asp MultiView id MultiView1 ActiveViewIndex 0 Runat server asp View ID View1 runat server h1 Step 1 h1 asp Label id lblFirstName Text Enter Your First Name AssociatedControlID txtFirstName Runat server br asp TextBox id txtFirstName Runat server From the Library of Wow eBook Displaying Different Page Views 225 br br asp Button id btnNext Text Next CommandName NextView Runat server asp View asp View ID View2 runat server h1 Step 2 h1 asp Label id Label1 Text Enter Your Favorite Color AssociatedControlID txtColor Runat server br asp TextBox id txtColor Runat server br br 4 asp Button id Button1 Text Next CommandName NextView Runat server asp View asp View ID View3 runat server OnActivate View3_Activate h1 Summary h1 Your First Name asp Label id lblFirstNameResult Runat server br br Your Favorite Color asp Label id lblColorResult Runat server asp View asp MultiView From the Library of Wow eBook 226 CHAPTER 4 Using the Rich Controls div form body html The first two View controls in Listing 4.18 contain a Button control. These Button .

TÀI LIỆU LIÊN QUAN
crossorigin="anonymous">
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.