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Œ;
);•;;'KLMBNB>0B>
€ 7'KLMBNB>0B>>1(M(G.C/{M(G.C/d::>.@B//.(7D
€ ‚kTW&);!](.(>.D:7(BD•9GG{…BA.0B->.+>7A/;
€ ‚kTW&;9GG{…BA.0BM(G.C/.A (B(/;
‹
‚kTW&;J(!G,"0'.AH&(B>(B(@.>A7.(B>0&B/;m!E>"#&F-K(MBN/B
N†(+&J&!!-{{D.&7D!./!.L&!-{{)Œ;;;)
Hình 1.4: Cài đặt IIS trên Windows 2000/ Windows XP
N'KLMBNB>0B>>1(M(G.C/7{M(G.C/Œ
‚kTW&)!](7>{B(+/{.(>.D:7(BD
‚kTW&!](D7//&BC{!](:>.+>7A/7(G@B7">B/
‚kTW&!](">(M(G.C/@B7">B/.(.>.@@
‚kTW&•J(!G,"0'.AH&(B>(B(@.>A7.(B>0&B/{!](3KE&'KL;yEA>7
36"Q&'KLy!wKX(+>O(!G"#P(!F-Kp7&!Š!-{{D.&7D!./
Hình 1.5: Cài đặt IIS trên Windows Vista/ Windows 7
Œ
%STGN5QR5CU+&/V
);ˆ;);y!wKX(+c/"7D"G.;<
!?(+7/zNxKs"N†(+0P&D'A6"B(0WAS>TU(+-!J>E(4(+GH(+<&`7
/"7D"G.;<ˆStart / Programs / Microsoft Visual Studio 2005 / Microsoft Visual
Studio 2005
);ˆ;;I.4(+GH(+MBN
‚kTW&)!](Z!%&Kb(File / New / Website;7"Km&!]((XG"(+&H!E(!T!O(!0z/7"
Hình 1.6: Tạo ứng dụng Web
‚kTW&k5/"(+K8"3!E(
Hình 1.7: Bổ dung điều khiển
Ž
‚kTW&!F-&.GB&!./%3P(:7+B.7G(!T/7"
-"ND&-7>7D&D7//•B@7"D#/BA;MBN;;:7+B
•
->.B&BG0.G:7+B•.7G.NeB&/B(GB>=<0B(9>+/B
•
‘
->.B&BG0.GN(!B(•D&3.NeB&/B(GB>=<0B(9>+/B
•
(/.D".(+’(;:7>/B^.D".(+;B^$
(G.(+7’(;:7>/B^.(+7;B^$
(!7(!B(’/.D".(+‚G.(+7$
^!7(!B(;B^’!7(!B(;.>(+$
‘
‘
:W<X
);Tb(+r"7(+!P(=Lập Trình Web Dùng ASP.NET Và C#,dk!'(!-!c
;+"#q(:!Tb(+7(=Giáo trình tin học và bài tập ASP 3.0, ASP NET=dkd‹
>:Y<Z[[=><\]^<
k')./J(!/%+(+0'3!J&(!7"+279:;<0'M(G.C/g.>A>.(+&,">?&;<
g>7ABC.>3“
k''KL0'&,"!O(!&!.KE&!I#KTV&4(+GH(+9:;<
k'!3AX4(+GH(+Y(!.J(Kb(+Q(-!|-&X(+=>Z=(!_(=&!7N†(+9:;<;
[
#
JH8JHG&HGE
[ !"#‹$!%&!'(!
:3;<
- Kiến thức:
*"(+&,-&!./(!01((!2(+3(!4&08&J&K8"3!E(&!"”(0'K8"3!E(3EA>7G2
DP"KTV&/aGH(+>.(+DF->O(!9:;<
*?-/(!01(!E"0'0F(GH(+!'(!!I.&J&!/aGH(+0'4(+GH(+&J&K8"3!E(>.(+
6"J>O(!DF->O(!CBN;
- Kỹ năng:
*?-/(!01(!'(!!I.&J&!7.J&0'KL&>T(+&`7Z(+D.IK8"3!E(;
*?-/(!01(!'(!!I.3!Q(R(+DF->O(!>.(+AS>TU(+;<
- Thái độ:
(!01(&m!JKXY&!&%&0'/J(+I.>.(+0P&0F(GH(+=D%7&!](0'!3>.(+
6"J>O(!/aGH(+&J&K8"3!E(;
:=><
#%/9+L/@!+_`&7Q7HQG&HGE:
!2(+D G.(1(/aGH(+K8"3!E(&!"”(9:;<7(G7>GMBN.(>.D/
fb(+Q(=Tb(+%(!T&J&K8"3!E(&!"”(>1(M(G.C@.>A;
fh(+(!,J&K8"3!E(MBNB>0B>&m&J&!"X&Y(!+(+(!7"=G.Km&!?(+/z+?-
&!?(+7GqOA!E"0'/aGH(+;
fP"6"QJ&K8"3!E(MBNB>0B>%KX(+-!J/(!>7&J&7+c!B.Z(+D.I
k>.C/B>;
Hình 2.1: Các điều khiển chuẩn ASP.N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(+/%3P(.AA7(G;
f+.'(!2(+!"X&Y(!>1(=K8"3!E(A7+Bk".(&o(&m&J&!"X&Y(!A7+B…=
A7+B9D+(0'9DB>(7BB^(!TK8"3!E(A7+B;
Hình 2.2: Button, ImageButton và LinkButton
YGHI.CBN/B(!.7(+hA&J&K8"3!E(/7"7NBD=B^N.^0'k".(
Hình 2.3: Thi hành ứng dụng Tinhtoan
daD /%3P((!T/7"
->.B&BG0.GN(!B(•&D&3.NeB&/B(GB>=<0B(9>+/B
•
)
(/.D".(+’(;:7>/B^.D".(+;B^$
(G.(+7’(;:7>/B^.(+7;B^$
(!7(!B(’/.D".(+‚G.(+7$
^!7(!B(;B^’!7(!B(;.>(+$
‘
;);ˆ;8"3!E(#-B>(3
8"3!E(('#KTV&/aGH(+KEI.>7&J&D1(3/1"0R(NQ(;
J&!"X&Y(!&`7K8"3!E(#-B>(3(!T/7"
fA7+B…r"Kp(!!O(!!E(!p>1(K8"3!E(;
f B^!"j0R(NQ(/zKTV&!E(!p>1(K8"3!E(;>.(+>TU(+!V-&Q!"X&Y(!
A7+B…0'B^KTV&!DF-=!"X&Y(!A7+B…KTV&T"1(=!"X&Y(!B^/zKTV&
!E(!p(!T D-;
f70+7B>DTU(+Gn(&s(D1(3K(;
f7>+BdJ&Kp(!&a7/5/z!E(!p&!.AD1(3
*•ND7(3E(!p>7(+D1(3wAX&a7/5AW;
*•/BD@E(!p>7(+D1(3I&!Y(!&a7/5&!47D1(3Km;
*•-7>B(E(!p>7(+D1(3w@>7AB&!7;
YGH
!-D9:B;B^’–>7(+&!`9:;B–$
!-D9:B;A7+B>D’–™{:&">B/{D.+.7/-(B;e-+–$
!-D9:B;70+7B>D’–!-{{CCC;7/-;(B–$
!-D9:B;7>+B’–•ND7(3–$
y6"Q!E(!p>1(>7(+MBN(!T/7"
Hình 2.4: Liên kết siêu văn bản
;);‹;8"3!E(/k.^0'> G.C(/
/k.^0'> G.C(/D'K8"3!E(!E(!pG7(!/J&!D%7&!](A'(+T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I0p>Y(GB^>73!vG7(!/J&!
BA/;…BA.0B9—(GB^˜$
fDB7>:!Tb(+!4&DB7>&`7F-!V-BA/KTV&G•(+KE^.J,&Q(!2(+BA&m>.(+G7(!
/J&!;
BA/;DB7>$
‚daD AH&&!](J&&!Š//7">.(+3!^aD AH&&!](/z+?-&!?(+7^J&Kp(!&!Š/=+J
>p&`7AH&K7(+KTV&&!](;>.(+>TU(+!V-K8"3!E(&!.-!|-&!]((!8"=7G"#P6"7&J&
BA>.(+F-!V-BA/;
faGH(+!"X&Y(!BDB&BG&`7KTV(+BA/š›KE3EA>7AH&!4&mKTV&&!](!7#
3!S(+;
fBDB&BG(GB^!.N&!Š/&`7AH&KTV&&!](;>.(+>TU(+!V-&!]((!8"AH&!O
BDB&BG(GB^/z>Q08&!Š/AH&&!](Ks"1(;
fBDB&BGBA!.NAH&KTV&&!](;>.(+>TU(+!V-&!]((!8"AH&=BDB&BGBA/z>Q
08AH&&!](Ks"1(;
fBDB&BG7D"B!.N+J>p&`7AH&KTV&&!](;>.(+>TU(+!V-&!]((!8"AH&=
BDB&BG7D"B/z>Q08+J>pAH&&!](Ks"1(;
YGHI.AXMBN/B"Dp&!+hA)/k.^=7NBD=)k".(>.(+KmK8"3!E(/k.^
D'K8"3!E(G7(!/J&!D/y!"•GDBDB&.(c.G’c"D-DB$….C/’•
y!!3
)•
Hình 2.5: Thiết kế Website du lịch
daD /%3P((!T/7"
->.B&BG0.G:7+B•.7G.NeB&/B(GB>=<0B(9>+/B•
@œ/:./k7&3•
D/7G7(!;BA/;9GG–p(!I.(+–$D/7G7(!;BA/;9GG–:!7(
!fci|–$D/7G7(!;BA/;9GG–!7>7(+–$
D/7G7(!;BA/;9GG–'I–$D/7G7(!;BA/;9GG–:!?r"&–$
D/7G7(!;BA/;9GG–"•X9(–$
((’D/7G7(!;BA/;."($
DN.;B^’(;.>(+$
‘
‘
->.B&BG0.GN!.(•D&3.NeB&/B(GB>=<0B(9>+/B•
DN7G7(!;B^’––$
@.>(’$—’D/7G7(!;BA/;."(f)$**
•
@D/7G7(!;BA/š›;BDB&BG
DN7G7(!;B^*’–—D˜–*D/7G7(!;BA/š›;7D"B$
‘
‘
y!!!'(!(!T/7"
Hình 2.6: Kết quả thực thi Website Du lịch
;);Œ;8"3!E(!B&3k.^0'…7G.k".(
f!B&3BG!.N>I(+!J&`7AH&&!](f&mKTV&&!](!7#3!S(+;
fB^9D+(r"Kp(!0p>Y!E(!p&`7K8"3!E(/.0W&!"j0R(NQ(;
f9".:./k7&3!"X&Y(!('#6"Kp(!K8"3!E(&mKTV&-!|-%KX(+:./k7&308B>0B>
3!&J&AH&&!](&`7K8"3!E(Np!7#K5;J>pAL&Kp(!&`7!"X&Y(!('#D'g7D/Bf3!S(+
)ˆ
%KX(+:./N7&3;
f>."-7AB…7G.k".(1((!mA;!"X&Y(!('#KTV&/aGH(+KE(!mA&J&K8"3!E(
…7G.k".(DI!'(!AX(!mA;
YGH!mA&J&…7G.k".(WY(!=!"(!F-=!mA!B&3N.^+.I(+2;
Hình 2.7: Ví dụ về CheckBox và RadioButton
‚8"3!E(!B&3k.^/0'…7G.k".(/7K8"3!E(('#KTV&G•(+KEI.>7AX
(!mA&J&!B&3k.^{…7G.k".(;.K_#D'K8"3!E(G7(!/J&!(1((m&i(+&m!"X&Y(!
BA/&!47F-!V-&J&AH&&!]((!T/k.^{> .C(/;J&!7.J&>1(F-!V-BA/=
^aD AH&&!](&i(+Tb(+%(!T/k.^{> .C(/;
J&!"X&Y(!
f…B-B7.D"A(/r"#Kp(!/&X!E(!p;
f…B-B7>B&.(r"#Kp(!!O(!!4&!E(!pB>&7D•!B.&!8"G]&$.>•.(7D•!B.
&!8"(+7(+;
f9".:./k7&3!"X&Y(!('#6"#Kp(!K8"3!E(&mKTV&-!|-%KX(+:./k7&308B>0B>
3!&J&AH&&!](&`7K8"3!E(Np!7#K5;J>pAL&Kp(!&`7!"X&Y(!('#D'g7D/Bf3!S(+
%KX(+:./N7&3;
Y GH k5 /"(+ !1A 0'. MBN/B "D&! ) >7(+ !.(+(&7(!7( +hA ) B^N.^=
…7G.k".( +W Y(!= !B&3N.^ (+.I (+2= …7G.k".( !" (!F-= D7NBD= )
…7G.k".(/>O(!KX=)k".(R(+3 ;
Hình 2.8: Ví dụ về RadioButtonList và CheckBoxList
##/9+L/@L/@&H7QAE/e+
>.(+-!s(('#&!?(+7/zOA!E"08&J&K8"3!E(KTV&G•(+KE3EA>7G2DP";
cj3!:./k7&308B>0B>=>7(+MBND"S(3EA>7Y(!!V-DPG2DP"("&m#1"&s"3!
!3;"G2DP"3!S(+!V-DPNv>(+=0-!IAA8(+J>p=AF3!”"(!F-DI3!S(+
)‹
K?(+;;;=>7(+CBN/z3!S(+!E:./k7&308B>0B>;
Hình 2.9: Sơ đồ xử lý kiểm tra dữ liệu nhập tại Client và Server
7"K_#D'!"X&Y(!&!"(+&`7&J&K8"3!E(7DG7.(.(>.D
Bảng 2.3: Các thuộc tính chung của các điều khiển Validation Control
!"X&Y(! ž(+!‡7
.(>.D.7DG7B 1(K8"3!E(&s(3EA>7;_#D'!"X&Y(!A'&!?(+7-!Q
^J&Kp(!3!/aGH(+7DG7.(.(>.D;
B^ !"j!S(+NJ.^",!P(3!&mDj;
<>>.>cB//7+B !"j!S(+NJ.^",!P(>.(+K8"3!E(7DG7.("AA7>#;
J>p('#/zKTV&!E(!pI0p>Y&`7K8"3!E(("&!?(+7
3!S(++J(+J>p&!.!"X&Y(!B^;
/-D7# r"#Kp(!!O(!!4&K8"3!E(
f.(By!S(+!E(!p!S(+NJ.Dj0n(&m3EA>7G2DP";
f7&>.(+>TU(+!V-3!S(+&m0-!IAG2DP"=K8"3!E(
3!S(+&m!E(!p(!T(+0n(&!A0p>Y(!T>.(+D?&!3;
f#(7A&>.(+>TU(+!V-3!S(+&m0-!IAG2DP"=K8"
3!E(3!S(+&!AGH(+0p>Y>1(A'(!O(!;
<(7NDBDB(&>- m&!.-!|-!%&!P(3EA>7w-!Y7DB(!7#3!S(+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E3(G2DP"0Wc9&&B//!7#rB>0B>N†(+&J&!&!](9&&B//
77N7/B!.L&77N7/B;
Hình 3.3: Kết nối cơ sở dữ liệu SQL Server 2005
;);•;!1A&X
f>.(+&a7/5>GBC7/3&!](9GGBC.D"A(
f!](D.I>TU(+&s(I.k."(GgBDG
fy!7NJ.1"K8&XB7GB>B^
f!ŠKp(!1(>TU(+G2DP"77gBDG
Hình 3.4: Thêm cột trong GridView
;);ˆ;P"&!Š(!=I.AW&J&&X
f>.(+&a7/5>GBC7/3&!](<G.D"A(/
f907D7NDBgBDG/!](D.I>TU(+D1(3G2DP";
*k."(GgBDGX&mD1(30W(+"h(G2DP"GI(+B^N.^;
*!B&3N.^gBDGX&mD1(30W(+"h(G2DP"GI(+!B&3N.^;
*#-B>D(3gBDGX&mD1(3G2DP"GI(+D1(3;
*k".(gBDGX&mD1(3GI(+(?DP(!;
*.AA7(GgBDGXGI(+(?DP(!KTV&!3/ (;8"3!E(>GBC&"(+&,-&!.
&!?(+7N7D.I&XGI(+('#
• BDB&?&!](Go(+G2DP";
• <G=7(&BD=-G7BJ&(?DP(!!j>V&!4&(R(+&F-(!FG2DP">%&->1(DTW;
• BDBB?^.JGo(+G2DP";
*BA-D7BgBDGXG.(+TUG•(+%!3;_#D'D.I&X&m3!Q(R(+D'A0P&3!JD(!
!.I;
fk."G.D"A(-> B>B/r"#Kp(!!S(+(&!&!.&J&&X;
f.(0B>!/gBDG(.7 BA-D7B.D"A( !"#E(&X!P(!'(!!'(!&XBA-D7B
.D"A(;
Hình 3.5: Hiệu chỉnh, tạo mới các cột
$#/9+L/@>7&7/&
Tb(+%(!TK8"3!E(>G0BC=K8"3!E(77/KTV&/aGH(+KE!E(!pG2DP";
"#(!1(=K0W77/&!?(+7-!Q%!3!O(!!4&!E(!pG2DP"+(+(!T
BA-D7B.D"A(&`7>GBC;
Hình 3.6: Hiển thị dữ liệu trong DataList
J&!"X&Y(!&`7K8"3!E(77/
f…B-B7>B&.(r"#Kp(!!TW(+!E(!pG2DP".>•.(7D•B>&7D;
f…B-B7.D"A(/r"#Kp(!/&X!E(!p&`777/;
!3!O(!!4&!E(!p&!.77/&i(+Tb(+%(!T!3&!.&XBA-D7B
•
.D"A(&`7>GBC;
Hình 3.7: Chọn chức năng thiết kế cho DataList
YGHE(!p!S(+(/J&!/aGH(+K8"3!E(77/(!T/7"
Hình 3.8: Thiết kế sử dụng DataList
$$/9+L/@JfJ7&JH
Tb(+%(!T!7K8"3!E(>GBC0'77/=K8"3!E(…B-B7B>&i(+KTV&/a
GH(+KE!E(!pG2DP";"#(!1(=KE!E(!pG2DP"&!?(+7-!Q%!3!O(!!4&!E(
!p!S(+6"7&J&7+c;
8"3!E(…B-B7B>&m&J&7+c(!T/7"
f —B7GB>BA-D7B˜—{B7GB>BA-D7B˜"Ÿ&!](r"#Kp(!!O(!!4&!E(!p&!.1"
K8&!Š^",!P()Ds(=-!Y7>1(&`7K8"3!E(;
f —BABA-D7B˜—{BABA-D7B˜kxN"X&r"#Kp(!!O(!!4&!E(!p&!.&J&AH&
G2DP">.(+K8"3!E(;
f —9DB>(7(+BABA-D7B˜—{9DB>(7(+BABA-D7B˜"Ÿ&!](r"#Kp(!!O(!!4&
!E(!p&!.&J&AH&G2DP">.(+K8"3!E(;XG"(+KTV&6"#Kp(!>.(+&L-7+('#
/z!E(!p^B(3z0W&J&(XG"(+>.(+&L-7+—BABA-D7B˜—{BABA-D7B˜;
f —B-7>7.>BA-D7B˜—{B-7>7.>BA-D7B˜"Ÿ&!](r"#Kp(!!O(!!4&!E(!p
+27&J&Go(+G2DP";
f —g B>BA-D7B˜—{g B>BA-D7B˜"Ÿ&!](r"#Kp(!!O(!!4&!E(!p&!.1"
K8GTW&!Š^",!P()Ds(=-!Y7GTW&•(+&`7K8"3!E(;
ˆ