SlideShare a Scribd company logo
Sử dửng AjaxToolKit tửo Calender và
              Popup
   KaelNguyen         01/02/2012, 11:16 PM
KaelNguyen                                             Sử dửng AjaxToolKit tửo Calender và Popup

1      Hôm nay mình sử hửửng dửn các bửn sử dửng bử AjaxControlToolKit NET4 đử
       tửo mửt Calender giửng CalenderPicker và mửt cửa sử Popup




Đửu tiên ta tửo mửt Webiste đử thử nghiửm. File > New > Website
KaelNguyen                                 Sử dửng AjaxToolKit tửo Calender và Popup

2




Chửn Emty Website, chửn đửửng dửn đử lửu
KaelNguyen       Sử dửng AjaxToolKit tửo Calender và Popup

3




Sau đó nhửn OK
KaelNguyen                           Sử dửng AjaxToolKit tửo Calender và Popup

4




Chuửt phửi Website và Add new item
KaelNguyen                                              Sử dửng AjaxToolKit tửo Calender và Popup

5




Chửn WebForm và đửt tên tùy ý, ử đây mình đử mửt đửnh
KaelNguyen                                           Sử dửng AjaxToolKit tửo Calender và Popup

6




Bên cửa sử ToolBox chuửt phửi tab General và chửn Add Tab
KaelNguyen                                      Sử dửng AjaxToolKit tửo Calender và Popup

7




Đửt tên tùy ý, nên đửt tên gửi nhử. VD : Ajax
KaelNguyen                             Sử dửng AjaxToolKit tửo Calender và Popup

8




Chuửt phửi tab vửa tửo > Choose Item
KaelNguyen    Sử dửng AjaxToolKit tửo Calender và Popup

9




Nhửn Browse
KaelNguyen                                           Sử dửng AjaxToolKit tửo Calender và Popup

10




Dửn tửi thử mửc chửa toàn bử Ajax, nên đử ử thử mửc gửc ử C. Và down bử AjaxControl
Toolkit NET4
KaelNguyen       Sử dửng AjaxToolKit tửo Calender và Popup

11




Mử thử mửc này
KaelNguyen                         Sử dửng AjaxToolKit tửo Calender và Popup

12




Chửn file AjaxControlToolKit.dll
KaelNguyen                                    Sử dửng AjaxToolKit tửo Calender và Popup

13




Sau đó vào phửn Designer cửa Webform vửa tửo, ử trong tag <form> </form>
KaelNguyen                         Sử dửng AjaxToolKit tửo Calender và Popup

14




Kéo thử ToolkitScriptManager vào
KaelNguyen                                           Sử dửng AjaxToolKit tửo Calender và Popup

15




Sau đó qua phửn Design đử xem,sử thửy xuửt hiửn phửn ToolkitScriptManager. Chúng ta
sử insert 1 table vào đử test thử 2 dòng 2 cửt
KaelNguyen                                               Sử dửng AjaxToolKit tửo Calender và Popup

16




Cửt đửu tiên sử là Ngày, Show popup. Bên cửt 2 dòng tửửng ửng ta sử kéo 1 textbox và 1
button vào. Dòng bên dửửi sử là 1 Button đử làm xuửt hiửn Popup và 1 Panel chính là cửa sử
popup. Sau khi add ToolkitScriptManager vào, các control sử có 1 mũi tên nhử bên phửi,
khi nhửn vào sử thửy có dòng Add Extender. Nhửn vào mũi tên cửa Textbox và chửn Add
Extender
KaelNguyen                                        Sử dửng AjaxToolKit tửo Calender và Popup

17




Vì chúng ta muửn làm xuửt hiửn mửt Calender nên sử chửn CalenderExtender và OK
KaelNguyen                                             Sử dửng AjaxToolKit tửo Calender và Popup

18




Properties Button kử Textbox, tìm phửn (ID) và copy ID cửa Button
KaelNguyen   Sử dửng AjaxToolKit tửo Calender và Popup

19
KaelNguyen                                           Sử dửng AjaxToolKit tửo Calender và Popup

20




Quay lửi Textbox > Properties > Sử phửn Extender > Sử Textbox1_CalenderExtender
(Textbox1 là ID cửa Textbox, và CalenderExtender : là tên cửa Extender đã add) > dán
ID cửa Button vửa copy vào ô PopupButtonID
KaelNguyen   Sử dửng AjaxToolKit tửo Calender và Popup

21
KaelNguyen                                        Sử dửng AjaxToolKit tửo Calender và Popup

22




Button thử 2 ta cũng Add Extender. Panel ta set Color cho Background đử dử nhìn
KaelNguyen                                     Sử dửng AjaxToolKit tửo Calender và Popup

23




Add ModelPopupExtender cho Button thử 2 > OK
KaelNguyen          Sử dửng AjaxToolKit tửo Calender và Popup

24




Copy ID cửa Panel
KaelNguyen   Sử dửng AjaxToolKit tửo Calender và Popup

25
KaelNguyen                                           Sử dửng AjaxToolKit tửo Calender và Popup

26




Properties Button 2 > sử Extender > sử Button2_ModalPopupExtender > Dán ID cửa Panel
vào ô PopupControlID
KaelNguyen   Sử dửng AjaxToolKit tửo Calender và Popup

27
KaelNguyen                                          Sử dửng AjaxToolKit tửo Calender và Popup

28




Trong Panel ta kéo thử 1 button (Button3) vào đử làm nút đóng cửa sử > copy ID cửa
Button 3
KaelNguyen   Sử dửng AjaxToolKit tửo Calender và Popup

29
KaelNguyen                                           Sử dửng AjaxToolKit tửo Calender và Popup

30




Quay lửi Button2 cửng sử Extender > sử Button2_Modal... và dán ID cửa Button3 vào ô
CancelControlID
KaelNguyen   Sử dửng AjaxToolKit tửo Calender và Popup

31
KaelNguyen          Sử dửng AjaxToolKit tửo Calender và Popup

32




Chúng ta test thử
KaelNguyen   Sử dửng AjaxToolKit tửo Calender và Popup

33




Save lửi
KaelNguyen                                              Sử dửng AjaxToolKit tửo Calender và Popup

34




Khi nhửn Button1 thì sử có 1 khung Calender xuửt hiửn, chửn 1 ngày và thửy ngày này xuửt
hiửn trên TextBox
KaelNguyen                                       Sử dửng AjaxToolKit tửo Calender và Popup

35




Theo đửnh dửng MM/dd/yyyy. Ta thử nhửn Button2
KaelNguyen                                                 Sử dửng AjaxToolKit tửo Calender và Popup

36




Panel xuửt hiửn. Nửu click Button3 thì Panel sử đóng lửi

More Related Content

More from Trường Tiền

Hướng dẫn cấu hình hạn chế truy cập internet trên adsl modem chào mừng đến ...
Hướng dẫn cấu hình hạn chế truy cập internet trên adsl modem   chào mừng đến ...Hướng dẫn cấu hình hạn chế truy cập internet trên adsl modem   chào mừng đến ...
Hướng dẫn cấu hình hạn chế truy cập internet trên adsl modem chào mừng đến ...Trường Tiền
 
Htg explains what is the windows page file and should you disable it
Htg explains  what is the windows page file and should you disable it Htg explains  what is the windows page file and should you disable it
Htg explains what is the windows page file and should you disable it Trường Tiền
 
How to add the windows calculator to the quick access toolbar in microsoft ex...
How to add the windows calculator to the quick access toolbar in microsoft ex...How to add the windows calculator to the quick access toolbar in microsoft ex...
How to add the windows calculator to the quick access toolbar in microsoft ex...Trường Tiền
 
Hdg explains what is the system reserved partition - help desk geek
Hdg explains   what is the system reserved partition  - help desk geekHdg explains   what is the system reserved partition  - help desk geek
Hdg explains what is the system reserved partition - help desk geekTrường Tiền
 
Hdg explains swapfile.sys, hiberfil.sys and pagefile
Hdg explains   swapfile.sys, hiberfil.sys and pagefileHdg explains   swapfile.sys, hiberfil.sys and pagefile
Hdg explains swapfile.sys, hiberfil.sys and pagefileTrường Tiền
 
4 websites for learning javascript, j query, python, html, and css help des...
4 websites for learning javascript, j query, python, html, and css   help des...4 websites for learning javascript, j query, python, html, and css   help des...
4 websites for learning javascript, j query, python, html, and css help des...Trường Tiền
 
Hướng dẫn cấu hình hạn chế truy cập internet trên adsl modem chào mừng đến ...
Hướng dẫn cấu hình hạn chế truy cập internet trên adsl modem   chào mừng đến ...Hướng dẫn cấu hình hạn chế truy cập internet trên adsl modem   chào mừng đến ...
Hướng dẫn cấu hình hạn chế truy cập internet trên adsl modem chào mừng đến ...Trường Tiền
 
Recover accidentally deleted files in windows
Recover accidentally deleted files in windows    Recover accidentally deleted files in windows
Recover accidentally deleted files in windows Trường Tiền
 
Install .net framework 3.5, 3.0, 2
Install .net framework 3.5, 3.0, 2Install .net framework 3.5, 3.0, 2
Install .net framework 3.5, 3.0, 2Trường Tiền
 
Htg explains what is the windows page file and should you disable it
Htg explains  what is the windows page file and should you disable it Htg explains  what is the windows page file and should you disable it
Htg explains what is the windows page file and should you disable it Trường Tiền
 
How to add the windows calculator to the quick access toolbar in microsoft ex...
How to add the windows calculator to the quick access toolbar in microsoft ex...How to add the windows calculator to the quick access toolbar in microsoft ex...
How to add the windows calculator to the quick access toolbar in microsoft ex...Trường Tiền
 
Hdg explains what is the system reserved partition
Hdg explains   what is the system reserved partition  Hdg explains   what is the system reserved partition
Hdg explains what is the system reserved partition Trường Tiền
 
Hdg explains swapfile.sys, hiberfil.sys and pagefile
Hdg explains   swapfile.sys, hiberfil.sys and pagefileHdg explains   swapfile.sys, hiberfil.sys and pagefile
Hdg explains swapfile.sys, hiberfil.sys and pagefileTrường Tiền
 
4 websites for learning javascript, j query, python, html, and css help des...
4 websites for learning javascript, j query, python, html, and css   help des...4 websites for learning javascript, j query, python, html, and css   help des...
4 websites for learning javascript, j query, python, html, and css help des...Trường Tiền
 

More from Trường Tiền (20)

Hướng dẫn cấu hình hạn chế truy cập internet trên adsl modem chào mừng đến ...
Hướng dẫn cấu hình hạn chế truy cập internet trên adsl modem   chào mừng đến ...Hướng dẫn cấu hình hạn chế truy cập internet trên adsl modem   chào mừng đến ...
Hướng dẫn cấu hình hạn chế truy cập internet trên adsl modem chào mừng đến ...
 
Htg explains what is the windows page file and should you disable it
Htg explains  what is the windows page file and should you disable it Htg explains  what is the windows page file and should you disable it
Htg explains what is the windows page file and should you disable it
 
How to add the windows calculator to the quick access toolbar in microsoft ex...
How to add the windows calculator to the quick access toolbar in microsoft ex...How to add the windows calculator to the quick access toolbar in microsoft ex...
How to add the windows calculator to the quick access toolbar in microsoft ex...
 
Hdg explains what is the system reserved partition - help desk geek
Hdg explains   what is the system reserved partition  - help desk geekHdg explains   what is the system reserved partition  - help desk geek
Hdg explains what is the system reserved partition - help desk geek
 
Hdg explains swapfile.sys, hiberfil.sys and pagefile
Hdg explains   swapfile.sys, hiberfil.sys and pagefileHdg explains   swapfile.sys, hiberfil.sys and pagefile
Hdg explains swapfile.sys, hiberfil.sys and pagefile
 
Deu datasheet rev_u
Deu datasheet rev_uDeu datasheet rev_u
Deu datasheet rev_u
 
Common port
Common portCommon port
Common port
 
Cc proxy
Cc proxyCc proxy
Cc proxy
 
4 websites for learning javascript, j query, python, html, and css help des...
4 websites for learning javascript, j query, python, html, and css   help des...4 websites for learning javascript, j query, python, html, and css   help des...
4 websites for learning javascript, j query, python, html, and css help des...
 
Common port
Common portCommon port
Common port
 
Hướng dẫn cấu hình hạn chế truy cập internet trên adsl modem chào mừng đến ...
Hướng dẫn cấu hình hạn chế truy cập internet trên adsl modem   chào mừng đến ...Hướng dẫn cấu hình hạn chế truy cập internet trên adsl modem   chào mừng đến ...
Hướng dẫn cấu hình hạn chế truy cập internet trên adsl modem chào mừng đến ...
 
Deu datasheet rev_u
Deu datasheet rev_uDeu datasheet rev_u
Deu datasheet rev_u
 
Cc proxy
Cc proxyCc proxy
Cc proxy
 
Recover accidentally deleted files in windows
Recover accidentally deleted files in windows    Recover accidentally deleted files in windows
Recover accidentally deleted files in windows
 
Install .net framework 3.5, 3.0, 2
Install .net framework 3.5, 3.0, 2Install .net framework 3.5, 3.0, 2
Install .net framework 3.5, 3.0, 2
 
Htg explains what is the windows page file and should you disable it
Htg explains  what is the windows page file and should you disable it Htg explains  what is the windows page file and should you disable it
Htg explains what is the windows page file and should you disable it
 
How to add the windows calculator to the quick access toolbar in microsoft ex...
How to add the windows calculator to the quick access toolbar in microsoft ex...How to add the windows calculator to the quick access toolbar in microsoft ex...
How to add the windows calculator to the quick access toolbar in microsoft ex...
 
Hdg explains what is the system reserved partition
Hdg explains   what is the system reserved partition  Hdg explains   what is the system reserved partition
Hdg explains what is the system reserved partition
 
Hdg explains swapfile.sys, hiberfil.sys and pagefile
Hdg explains   swapfile.sys, hiberfil.sys and pagefileHdg explains   swapfile.sys, hiberfil.sys and pagefile
Hdg explains swapfile.sys, hiberfil.sys and pagefile
 
4 websites for learning javascript, j query, python, html, and css help des...
4 websites for learning javascript, j query, python, html, and css   help des...4 websites for learning javascript, j query, python, html, and css   help des...
4 websites for learning javascript, j query, python, html, and css help des...
 

Su dung ajax toolkit tao calender va popup

  • 1. Sử dửng AjaxToolKit tửo Calender và Popup KaelNguyen 01/02/2012, 11:16 PM
  • 2. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 1 Hôm nay mình sử hửửng dửn các bửn sử dửng bử AjaxControlToolKit NET4 đử tửo mửt Calender giửng CalenderPicker và mửt cửa sử Popup Đửu tiên ta tửo mửt Webiste đử thử nghiửm. File > New > Website
  • 3. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 2 Chửn Emty Website, chửn đửửng dửn đử lửu
  • 4. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 3 Sau đó nhửn OK
  • 5. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 4 Chuửt phửi Website và Add new item
  • 6. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 5 Chửn WebForm và đửt tên tùy ý, ử đây mình đử mửt đửnh
  • 7. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 6 Bên cửa sử ToolBox chuửt phửi tab General và chửn Add Tab
  • 8. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 7 Đửt tên tùy ý, nên đửt tên gửi nhử. VD : Ajax
  • 9. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 8 Chuửt phửi tab vửa tửo > Choose Item
  • 10. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 9 Nhửn Browse
  • 11. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 10 Dửn tửi thử mửc chửa toàn bử Ajax, nên đử ử thử mửc gửc ử C. Và down bử AjaxControl Toolkit NET4
  • 12. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 11 Mử thử mửc này
  • 13. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 12 Chửn file AjaxControlToolKit.dll
  • 14. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 13 Sau đó vào phửn Designer cửa Webform vửa tửo, ử trong tag <form> </form>
  • 15. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 14 Kéo thử ToolkitScriptManager vào
  • 16. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 15 Sau đó qua phửn Design đử xem,sử thửy xuửt hiửn phửn ToolkitScriptManager. Chúng ta sử insert 1 table vào đử test thử 2 dòng 2 cửt
  • 17. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 16 Cửt đửu tiên sử là Ngày, Show popup. Bên cửt 2 dòng tửửng ửng ta sử kéo 1 textbox và 1 button vào. Dòng bên dửửi sử là 1 Button đử làm xuửt hiửn Popup và 1 Panel chính là cửa sử popup. Sau khi add ToolkitScriptManager vào, các control sử có 1 mũi tên nhử bên phửi, khi nhửn vào sử thửy có dòng Add Extender. Nhửn vào mũi tên cửa Textbox và chửn Add Extender
  • 18. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 17 Vì chúng ta muửn làm xuửt hiửn mửt Calender nên sử chửn CalenderExtender và OK
  • 19. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 18 Properties Button kử Textbox, tìm phửn (ID) và copy ID cửa Button
  • 20. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 19
  • 21. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 20 Quay lửi Textbox > Properties > Sử phửn Extender > Sử Textbox1_CalenderExtender (Textbox1 là ID cửa Textbox, và CalenderExtender : là tên cửa Extender đã add) > dán ID cửa Button vửa copy vào ô PopupButtonID
  • 22. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 21
  • 23. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 22 Button thử 2 ta cũng Add Extender. Panel ta set Color cho Background đử dử nhìn
  • 24. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 23 Add ModelPopupExtender cho Button thử 2 > OK
  • 25. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 24 Copy ID cửa Panel
  • 26. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 25
  • 27. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 26 Properties Button 2 > sử Extender > sử Button2_ModalPopupExtender > Dán ID cửa Panel vào ô PopupControlID
  • 28. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 27
  • 29. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 28 Trong Panel ta kéo thử 1 button (Button3) vào đử làm nút đóng cửa sử > copy ID cửa Button 3
  • 30. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 29
  • 31. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 30 Quay lửi Button2 cửng sử Extender > sử Button2_Modal... và dán ID cửa Button3 vào ô CancelControlID
  • 32. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 31
  • 33. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 32 Chúng ta test thử
  • 34. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 33 Save lửi
  • 35. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 34 Khi nhửn Button1 thì sử có 1 khung Calender xuửt hiửn, chửn 1 ngày và thửy ngày này xuửt hiửn trên TextBox
  • 36. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 35 Theo đửnh dửng MM/dd/yyyy. Ta thử nhửn Button2
  • 37. KaelNguyen Sử dửng AjaxToolKit tửo Calender và Popup 36 Panel xuửt hiửn. Nửu click Button3 thì Panel sử đóng lửi