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

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

Creating Custom Controls with User Controls /// /// Execute the step’s NextStep() method /// and move to the next step /// protected void btnNext_Click(object sender, EventArgs e) { bool success = ((IWizardStep)_currentStep).NextStep(); if (success) { if (StepIndex /// Move to the previous step /// protected void btnPrevious_Click(object sender, EventArgs e) { if (StepIndex 0) { StepIndex--; LoadWizardStep(); } } html { font:14px Georgia,Serif; } fieldset { display:block; width:600px; padding:20px; margin:10px; } Wizard From the Library of Wow! eBook Dynamically Loading User Controls 335 . | 334 CHAPTER 7 Creating Custom Controls with User Controls summary Execute the step s NextStep method and move to the next step summary protected void btnNext_Click object sender EventArgs e bool success IWizardStep _currentStep .NextStep if success if Stepindex _wizardSteps.Count - 1 Stepindex LoadWizardStep summary Move to the previous step summary protected void btnPrevious_Click object sender EventArgs e if Stepindex 0 Stepindex-- LoadWizardStep script html xmlns http www.w3.org 1999 xhtml head id Head1 runat server style type text css html font 14px Georgia Serif fieldset display block width 600px padding 20px margin 10px style title Wizard title From the Library of Wow eBook Dynamically Loading User Controls 335 head body form id form1 runat server div asp Label id lblStepNumber Runat server fieldset legend asp Literal ID ltlStep runat server legend asp PlaceHolder id plhWizardStep Runat server fieldset asp Button id btnPrevious Text lt Previous CausesValidation false OnClick btnPrevious_Click Runat server asp Button id btnNext Text Next gt OnClick btnNext_Click Runat server div form body html 7 The list of wizard steps is created in the Page_Load method. The path to each wizard step User control is added to a collection of wizard steps. The Stepindex property represents the index of the wizard step to display. The value of this property is stored in ViewState so that the value is available across multiple page requests. The current wizard step is loaded by the LoadWizardStep method. This method uses the Stepindex to grab the path to the current wizard step. Next it uses the Page.LoadControl method to actually load the wizard step User control. After the LoadWizardStep method loads the current wizard step it calls the control s LoadStep method and initializes the control. From the Library of Wow eBook 336 CHAPTER 7 Creating Custom Controls with User Controls The page also contains a Previous and Next button. When you click the Previous button the .

TÀI LIỆU LIÊN QUAN
TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.