Csharp Advanced
Csharp Advanced
Csharp Advanced
67 4 5
( = 9
4 ( 012 + 3
<*
'
=* > - + <*
D 12 6 E ==+ D
= 7 +4
K
HF
9 C + = -;
-* . + / ( : 3
. + / ( D
D(
67 K O
+ /-; :
94 8 (
> - 2 @A B ? 6 =2
5 9 C + G 2 H I 4 * = -;
: ==+ D
( 3=
= 9
. +&
' 6 (
NF A
. +/
<*
9 C +
M9 F 3
4 JI
6'
:3
S =+ ,
D - /
> KR
K !=
8F A
LF
0 P
K Q
AF
Tel : T%"U"VT%"TU
;X
\ = 6 =2
+D
D
*3
= 4*3
67 G
+[ 6 L
W ( . + / NF A
'
D +
W
M9 * 3
L=
67 Y 7
:3
S3 !
"T::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::^
#
(
"
!
' % $ % &"
)! *+
./
) ,-
./
for ,-
.(
for ,- 0 " 1+
34
" 2+
33
while ,-
3
3
do while ,IF ) 5!
36
Else if
3#
Switch
3(
) 7
Math
8 9
8 9:
foreach ,64
6
=*<
>
?$ > )
63
6/
6
#4
#6
#/
#
/
/.
" ) @AB
CD
>):
>! E
@AB
Get set
=!F G ?$ 0 " 1+
I !F H
I+ J
Dialogs
Timer
System.Collections
) ?7+
!+?B
((
System.Drawing
! K9 L0 "!<
M F !H
DLL
Threading
> P
>0
"!OFN I, F
Q F"2
Q F R"!B
#
>0
? T+
PS
MD5T+
PS
.
.3
"!OF
Q F R"!B F U
.6
.(
UserControl
3.
"#V:::::::::::::::::::::::::::::::::::::::::::::::::::::
3#
3(
:::::: ^D
D ' ]G
V B
V B & + "
"U":::::::::
::::::^_
4 ! 1+]G
System.Data.OleDb
OleDbConnection
OleDbCommand
WXY
OleDbDataAdapter
WXZ
DataTable
WX[
66
>! H L H
##
#(
LINQ to SQL
/6
"`%::::::::::::::::::::::::::::::::::::::::::
:::::::::::^ASP.NET]G !E J
(
(.
(
!<
asp
)
\ & 1]
.4
MasterPage
.4
. .
. 3
. 6
. /
Navigation
.
SiteMapPath
FileUpload
AJAX
.36
) B B
.3/
8 !
67 4
9 +
3 E
( ) * +
: <=+
< =+
6 -=*[
X / -*
9 C +4
+ ;
L=
L -2 D O /
==+
=+
^K 21d ]
X 4
b
>
=
67 ( D
= * <* 8
94 8 (
!
K
+
<
J9 &(
! 9
+ <
<* >
<* >
9 C +6 (<
L 3
= 3
G + 1b 3 K
* +/ Ge
= 3
a0 K
67 3
4*
==+
? G G
? 3I
! 7 c 89
-2^ ' 4 * BI ]
? 3I
4 * 6 ( <* * ? G / /
6 (/
73
L=
9 C + 4 ? 3I 4 W2 L=
4 * 6 ( - ( < =+
. +/
><
< -! ?
/ -*
6 (
+
1b <
- 4
=E
>4*
6 =2
5
67(
9 C +4
9 C +6 (/
- 9 9 C +6 (
<
\ 9 8 O 4
'E
< =+ 4(
L
7B
<(
b <(
9 C +f 9
D O
! 7(
^
<
6 (/
X 8F
+D
:^<
4 : ==+
>4*
6 9
6 (
NF A
< * > = 7 9 C + ? 3I 4 W2
< =+
JI
= 7
8F ]:D
D'
!
`
^ c !<N
!`H
)
` ?B !`
% S " BN ?
G S >!
+_ %
%C _ "
I;
"!B ! de
! >!
?B
)O
! 0 = B !) >
" B
> c !<
)" = 2
> "
^ b Qa N !2?< ?B
! M ,B
"!B B A _ C
%C _ 0
c !< +
9
^%
"
^ b Qa N
^.b Qa N ?B \ f+
%C _ 0
^.b N
"
"2
c !< 9 ?B M ,B
" #$$ %
> ! ^3b Qa N
1] G "
a F !H
> "T
! @"
`
`S "!`B T ) `d
` "
"
"T
)
B
" " \ `- G `
+`
,`]
" B=
)O
S 0 !+O = "
d !H
?B M ,B
)" ! *9
S "!B T ) d B
`
" " S
"
" 2 2; "
I ;0 %
!_ B
#$$ %
!+I ! B %
a F !H & 19 T+
>
"
#$$ %
! > ! %D!
" #$$ %
"
" #$$ %
&
?B " 1+ R; 0
B +-
"
!
) R;
gU 9G
` ! > !`
B T?B
d T " ;
+a G
! ^3b Qa N
+S
1] R C) " h -
! B >!
?B \ f+
" d
"2 >
! 9
` !
!
+_ %
,] =!F
" "
G " ^ b Qa N
^ b N
>
! M ,B
"!a
)O
!H + S " " !_ )
i$ %C _ "
h %C _ " (
B
?B
)O
gU 9 >
> ) %C _ "
G 0 = B !)
!_ =!F G >
! )
"!B 2
$ $
" )" j C
I;
%C _ 0
B " " !_
!P " !2?< !)
" " !_
"!B %
!
Oa
1] "
M ,B
!K ?
,] =!F T)
!2?< G
H
>
+_
!
= B!)
" "" T ) d
I ; % F B =!F >
>
! )
?B QCD k 9!9
9
G ?lC) )"
)" ! *9
CB" G+
%C _ " A7
)" ! *9
"!B
)O
R; ) H
6b
)" ! *9
RO ) H
! *9
C ^6b Qa N %
B
%C _0
! k 9!9
G C) T
B\ -G
)"
R; % F )% '
= B!) % !+I )
? ; R;
T) d
+_ 0 ?
=2
B>
" A7
?B "
B"
"
" 1+
! &
R; m
!+O
? ; >!
GS T
? ; I;
? ; !+O
QCD G !) n " B %
& 1+
!_ !P " > )
%C _ 0
G C)
9
U 9 > ! !+O
)"
OF
R; 1 n
G 0 %)
!H
"
" 1+ o !H " 2
! " ! K9 j C > !
G 0 $ *
R"!B "
> ! A7 "
d R"!B "
>!
G 0
" D
I;
! B B"
" 1+ ! B
G 0 + '
! 0 Qa
"
G 9
! >! R 0
+S "
B R;
" 1+
" 1+ q 9 \ f+
j C >!
G 0 "
!+?B G
B % !C 9 kS
> ) !+?B 0
G 0 "
! M
B %C _ " a, ?+
_" !) "
Q7 M F !H > " )
?B \ f+
+&%
!%
a r ("
) f !H A7
?B
s T ?B
+a
!C 9 !+?B G C) Q7 "
%d "!< T ) d IS 7 " I ;
gU 9
T 0 "!<
T "!B
I; 0
B
s
!
B " TI > )
" I ; 0 " 1+
I?
, B G+
>!
` ! =!F >
` !
S "
9
"
a F hQ
G
!+ " > ! B %
"!B
)O
, _ %C _ " B
View code
: !
St
> "
M ,B !P " @AB !)
%C _ G "
/b Qa
#b Qa
F U u!F j < & ]
%
FU
" `
) @AB ) ) G " %
O` F `U ) ) C) B T?B
` f +B R `C) ` ) `) G %
` f +B G` 0 >
C (b Qa "
) B"
FU
9M
B ?a
+a G
FU
?B
+ S T ?B
" O
) O /b Qa
)O
" B t C)
! > ) ) h %C _ "
" 1+
I; 0
" 1+ !+O I ;0
! de dll Q F Qd "
) ) /b Qa
FU
! "
CD B
!
B" "
) ) a,
>)
f +B G
" QK1
>
> ) %C _ " B ?a
)O
"!B T ) d v
(b Qa
0 ` %B!
`) ` f +B G` G+d `
9 )
f +B
f +B G
f +B G [1]
?B
) O (b Qa " B
+ "
!+ " I ;
+d
t C)
B !P
" B +- > !
P$ B G %
"" g U 9
T ?B
Net framework
' % $ % &"
`?B ` !`
`
kK C !9 w B >
visual studio
9 B
!_
+d "
0 "
>)
f +B
Q` D T+ `
" " `
` +
!P " C
` ! xp Q7 Q D T+
T+ ` M > !
!` Q` B
!H G ! ?
-"
% I;
?) f !
C >)
A7 "
; j < C >!
!_
+
!
! G
)"
!_
9 !H
kK
! >)R 0
R; H
S "
!C) M 9 9
B T
? ;
L0 "
?B
9 C
! R; !P "
>)
0 % " ) f
f +B R $ % G <
> ) Q D T+
"T 9
P$ T ?
"
xdQ D
! >)0
! Q F B % G % &" >
Q D T+
+d " Q D T+
> ! T ?B T
c,c++
! B%
R; %
)"
kK TS D T+
`+ ` ! G+`
T "!H!
M ">
! R C) Q D T+
"!`B ! *9 Q D T+
" `
! B% G % ">) H
" % &"
! R 0 & + "
"
! >! H"
"
? ;
r )! *+ 3b
`
`
+a G
) f Q w B
T ?B
! T
QCD b Qa
P
9 " 9
" > OD
O G !H "
9
B"
T+d ^ ;N
+
{ } % AD " Qd "
g ] " D y ! 9 >!
" & + " C) B T?B
> ) B C) G ?lC)
!` *+ M` y` ! 9 > !` A7` T
R C ) B % F B B G+
>!
g ]" D: 0
4b
! Qd "
T) d ? ;8 9 >
CD & ]
) ! *+ G !H
?+
" 1+
! *+
)"
S T ?B " 1+
)! *+
I; 0 T 9
" 1+ Q _ 8 9 0 { d !P " T ?B y ! 9 ^
R; 0 T ) f 8 9 Qd " +_ T ?B y ! 9 ^ , N 8 9 Qd " a
?a
y ! 9 h Qa " B
! *+
CD a = ?C) ! *+ " !H r +a
% S
T ?B " 1+ ! *+
r )"
" D " CB" OF
!_ VB % a9 "
B )" !_
! =!F >
+`
! % F B CB"
BG "
`+_ " ` !
"
N"
> ! ?B 8C T)
! Event
"
! r 7
CB" M % F B B G > !
^% 8 9 M "
d !`H A7 "
8C
! VB % a9 M
`9 ` ?B M ,B
`+_
?B
+_
properties
? "
d !F CB"
! > B"
!) n ! 0 B "!B !
M ,B
)"
!_ VB % a9 Qd "
! *+
T )" !_ =
! *+ Qd "
!~
|} " Qd " ) B
\!U
8C Q] -
T ?B
r! 0 B Q7 T )"
private void button1_Click(object sender, EventArgs e)
{
int i = 5;
int j = 7;
int add = i + j;
textBox1.Text = add.ToString();
}
?B ) O
y,+f > ) ! *+
!_ T
Q] - 9 ?B M ,B CB" >
" R $ T ?B
"
! 9 ?B M ,B
int A7 T )"
int :
F5
Q 9 > ! r +a
!_ !P a " T 9 C
T )"
rChar
T ?B
QCD k 9!9 G
r 7
private void button1_Click(object sender, EventArgs e)
{
char i = 'a';
textBox1.Text = i.ToString();
}
r String
r 7 T ?B
" 1+ m? !+ 0 T ?B y ! 9
"
> +
T ) f !H
T ?B " 1+ ToString() 0 %
r 7 g ] " D Q7 R"!B 8C
m? !+ R"!B 8C r +a
Qa
m? !+
^ m .3 %
+ S N r T ?B
,~
" 1+
& ]G
Convert
0 )! *+ !P " int
!H .3Q7
m? !+ Q 9 > ! r +a
" D R C )!+a9 B ?
int
"
%K R 9
B M$ B g ] " D
+_
B % ? % & 1+
T ?B
F - "
g ]" D :
!$ a? Q S"
VB % a9 "
)" ! *9 \!U
b Qa Q7
CB" text +
?B \!U
d !H
I;
)" !_
" D
+F!H VB % a9 " 0
" D "r 7
1] " CB" M VB % a9
I ; text
b
?
!0 B
?B QCD
Q 9 >!
9 >!
! G C)
rT
string.Format
"
"" j C
OD T_
"
OD " D
d !H r +a
r ?B " 1+ & ]
int num1 = int.Parse(textBox1.Text);
int num2 = int.Parse(textBox2.Text);
double d3=(double)num1/num2;
textBox3.Text = string.Format("{0:0.000}", d3);
TC ?
"" : :
!0
Min
Max
- ..33/.43#(6 //6(4(
..33/.43#(6 //6(4(
Int64
bE+383 4.(.3
E+383 4.(.3
float
bE+308 / /# 3 3 (#.3.
E+308 / /# 3 3 (#.3.
double
a
true
b3./#/
z
false
3./#/
char
bool
Int16
b. / (3# (
. / (3# /
Int32 Int
.6#
byte
"
pictureBox:
T ?9
0
fS"
properties
R; 0
%C _ 0 a?
a " ""
VaD
import
?B
BackgroundImage
?B
)" ! *9 Stretch
)
VaD !
BackgroundImageLayout
?B QCD Qa G
B z !p 0
pictureBox1.BackgroundImage = Image.FromFile(@"c:\cat.jpg");
\\ & ]
?a fO
a,
!P "
?B " 1+
)" !_
9 C
I?9
\ % AD 0
! Q F ?B "
VaD +
" r +a
d !H
pictureBox1.BackgroundImage = Image.FromFile("cat.jpg");
)" !_ R !P "
+d "
R;
+ "
"!
Q F Debug bin
I, F
<
.exe
T)
!+ " R + !
F ; C ""
<0
! Q F
" !B " 2
B" ""
d !H GCU "
! B >!
F U Q F ?$
"
fO
VaD Q7
"!
r ) ,- b
R 9
) ,- 0 " 1+
" 1+
BG
?+ )
?B 8C T)
T)
for
,- T 0 "!w R;
! "
) 9M " D
"!a y ! 9 int 9
T) d
"
,- G S
d" "
kS
d !H A7 %
) ,- !H
S "! H
?+ ) & 1+
> ) %C _ 0 ) ,-
dM "
=2
" )
,- "!B
% ! 0 Qa & ]
?B
h
" !H A7 N"
!1] i S
:!
2B 0
2? " ^ O !
|} Qd "
,- B T ?B
6
M !
fO
,- T "!a
+ "R
!) " "
+ B% & ]G
" 1+ 6 " D 0 !1]
) ,- 0
8C
,- y ! 9
] ,- G
,- "!B B
i )"
>
FU i
- M G! ? %
! *9 M
FU i
!
h-
- M !P "
]
)"
,-
!_! 5!
""!P !
M G! ? %
,- G ! ?
!_ VB % a9 "
" %
Q] -
B ?
?B
?B
& + "
] 0 !+a$ B M
!_! 5!
?B
? %
5! "
,- Qd " "
"!B
,- "
) 9M " D !0
T ?B " 1+
?B
0 9 BG "
8C T)
,- %
?B
! r 7 "
,- Qd " " T 9
i 0 r +a
R; !P " T
B !) > ,
% AD G
+_ T ?B " 1+ % AD 0
! &
U 9 > ! r +B
) f !
,-! !) "
r )" ! *9 Qa G
int sum = 0;
for (int i = 0; i < 1000; i++)
{
listBox1.Items.Add(sum);
sum = sum + i;
}
textBox1.Text = sum.ToString();
8C Q] - a? > !
h
)" !_
y" M "
R; T "!B F U R;
T+
M
BG
!) B % & ] G
)
T "!B C " 1+
VB % S "!B B
) ,- 0 !H "! H
!_
listBox1.Items.Add(0);
listBox1.Items.Add(999);
r ?B !
)" ! *9 Qa G
Bh-
int sum = 0;
for (int i = 0; i < 1000; i++)
{
= "+sum);
listBox1.Items.Add("Sum
sum = sum + i;
}
textBox1.Text = sum.ToString();
r C1 VB % S
R; & 19 9
!0 B
)" !_
int sum = 0;
for (int i = 0; i < 1000; i++)
{
listBox1.Items.Add("Sum
= "+sum);
comboBox1.Items.Add("Sum
= " + sum);
sum = sum + i;
}
textBox1.Text = sum.ToString();
1] "
comboBox
'T) =2
9
?B M ,B =!F >
"
"
)"
2+
!_
VB % S M " B T
1] " VB % S M
) d
=!F B ?B
r! 0 B Q7 T ?B
!<
) +
! M T) d
VB % a9 M
"
G "
VB % S
"
r 7
a? > !
d !F =!F Load"
" S ) d
=!F +_ G ! ?
)O A_ B
t C) "
T ?B M ,B CB" >
! *9
R;
T ?B "
! B
d !F
TextChanged"
VB % a9 "
r
0"
R; T "!B
>
B"
TextChanged"
?B M ,B VB % a9 >
d !F
!
CB" M ,B "
0
TextChanged
R " "
" !F
"
! 0 B h - \ d T )"
!<
?B "
a!+B B !H A7
"!B "
?B "
T)
!+B B M VB % a9 "
?B !
!+B B G " !H % a R;
=
"
!
B ?B
u D VB % S
?B " 1+ R; 0 "
%C _ 0 R; >
! "
?B
\ f+ VB % S " B
d !F > !
?B " 1+
? "
r"! H
>!K?D +
SelectedValueChanged
"
d !H
0
G 9 ?B M ,B VB % S "
!_ VB % a9 M "
f+ >!K?D ! 0 B "
"
Q B
,d "
,-
,- "
M >!
>0
a >
,- G
?B !
,-
" O
r 7 r
Q B
"
p
,- B % & ] G
B % yn
?+ )
,- M
4 4 ,- G QB " " O !
)"
"
,d "
"
,d "
,-
+ " R; !H
% 9 C,B
9 " 9 ,- 0 !+CB R + )
?B y ! 9
?B u!F
- ?B
M !)
j C " d "
0 { d int y ! 9N r ?+ ) T) "
BL
] VB % S G ! ?
! " ?B
!0 & ]
,- GCU "
^ ,-
int i, j;
for ( i = 0; i < 10; i++)
{
for ( j = 0; j < 10; j++)
{
listBox1.Items.Add("test
}
}
i="+i+"
j="+j);
QCD
& ]
> ) B 0 >"
9 "
i+=2
" ; T)
"
! ! " %B!- = H A7
!0
" i+=1 %
)" ! *9
"
R +B!- = H
i++
"
d !H
t C)
?B
r%
I+=1
I-=1
I+=N
I++
I--
I=I+1
I=I-1
I=I+N
I*=N
I=I*N
I/=N
I=I/N
I-=N
I=I-N
9
rQ7
" D !) "
? T) VaD!
) ,-
% & ]G
R; y ! 9
% While ,- T O ? ; R; T ) d
B>
,- G "
while (true)
{
}
G C) T) )
!
r T ?B
"
" B"
Q- L
,-
!
G C)
% I
,_
int i = 0;
while (i<100)
{
listBox1.Items.Add("test");
i++;
}
,-
?a
B G !H "
09
c
" 1+
"
" 1+ break
r 7 T ?B
QCD L
+ "0
G C)
{ d ,- 0
R !
! 0
,- 0
" +
64 ! ! i +_
d !H
,- !) " r +a
d !H
7 G C) " A7
int i = 0;
while (i<100)
{
listBox1.Items.Add("test");
i++;
if (i == 50)
{
break;
}
}
"" T) d gU 9
,- Q7
,- G
"
B L
! 5!
%
"
I; >
%C _ " B T
,- T 0 "!w R;
do while
! do Qd " B
! ) 5!
T) d
0 ?) + S
B >!P "
,-
% while
do
{
} while (true);
r IF ) 5! 6b
>
!+H
5! > !
" A7 T ?B
"
" 1+ if
" 1+ >
+ "0
?B
" % AD 0 >
CD
p!
9 5! > !
! "
d !H
?B !+?B 5!
!+a$ B
>
!+H
% AD " 0 !+a$ B
" 1+ % AD 0 > !
"
' 1?
>!
VB % a9 0
" D B
"
! r 7
%D!
a?
)"
=2
5! 2B !) L
" T ?B
T ?B
7 "
! ) 5!
0
C >
a L
G ! ? G <" ;
5! !
!P "
"
!
!_!
{
textBox2.Text = "#
! "
";
}
}
, R; B
!_! 5!
2B !) B %
$switchN
"
' )"
!_ = " VB % a9 "
I;
F "
+ " else if
{ d break
?B
%F "
"
+ "
" D B>
?B
! r 7
0 = B ) R"
?B " 1+
+ " "
"
0 + !< Qd " !H
g ]" D
Q 9R
: R C) 0 T) case Q
h
m? !+ : 0
default
default
9
Qd "
d !H
+ " ) 5!
m? !+ :
rT )"
! *9
break;
case "1":
textBox2.Text
break;
case "3":
textBox2.Text
break;
case "hello":
textBox2.Text
break;
default:
textBox2.Text
break;
= "% ";
= "
";
= ")+ ";
= ")
* ('&";
}
}
rT
? T 9
! 0 z !p
switch
+ !< Qd " + S
switch (textBox1.Text)
>!
) =2
QCD G ,R;
"
" D
"
+F 1+9 G
A7
?B M$ R C)
C_ M9
5!
?$
d !H
a?
" D !H r 7
'%
9 ]
T ?B
" 1+ L
G 0 644" D yS f A7
$ M yS f
" D T P !H
If(i!=500){
}
r
? ;& + "G
' )"
!+I 9 T 0 "!<
fO9
" D
7 > ?$
TC B
B>
!0 "
!b
int a, b, c, max;
a = int.Parse(textBox1.Text);
b = int.Parse(textBox2.Text);
c = int.Parse(textBox3.Text);
max = a;
if (b > max)
{
max = b;
}
if (c > max)
{
max = c;
}
textBox4.Text = max;
r )" fO9
private
{
int
x =
for
{
R; R" Q B
+F!H >"
}
if (sum == x)
textBox2.Text = "#
else
";
" D M b.
textBox2.Text = "#
/' ";
}
. 3
3 4 !3 %
-/. 5
r )" j C
3 4 !3 /
#
R; VaD!
+F!H >"
+ 2
8# 0
01
8
" D M b3
r )" !_ VB % S M "
?+
! < jf " ! B
>" D
) 9 !1] G b
r )" fO9 ?
v,7 M > sD ? + I ; !H
" D
B>
! b6
b = float.Parse(textBox2.Text);
c = float.Parse(textBox3.Text);
if (a + b > c && a + c > b && b + c > a)
textBox9.Text = "OK";
else
textBox9.Text = "NO";
}
= "
" S"
T) float 0 r +a
>) O
B>
! b#
+B F
! b/
rQ
int i, n, factoriel = 1;
n = int.Parse(textBox1.Text);
for (i = 1; i <= n; i++)
{
factoriel = factoriel * i;
}
textBox2.Text = factoriel.ToString();
r Math 1-6
@ ?
A7
?B " 1+
I; 0
B" ""
r
;%
8 90
" DM R 9
s @AB G "
@ ?
\ 9 `g"
r
!P "
!)
9 R;
d !F fO =
?B \ - R C !
u!F A7 % >
0
" DM Q
>
" = B !) S
Q
8 9
+B F 8 9
M
+B F B T
=2
? 9
F ??B Q
+B F
B R; 8 9
%OH!
"! P
>
8 9,
: !
T+
9T 9
A7 % 0 & ] " 8 9
QCD G T "!B
""
"Q
d !F
+B F \ -
??B
d !F
a; R
?$ !)
+B F QCD B T
=2
+B F 8 9 G C) " A7
" y,+f :
8 9 s
"!H!
) % GaC
I 9:
gU 9
y ! 9 8 9 !P " 0 { d
"! H C
>
)8 9
>
S "! P >
??B
?B
RO
d !F 8 9 !P " "
y ! 9 .b Qa & ]
8 9 R; %_
" T) 0 = B !)
) B ?+ )
) %OH!
T 0 "!<
? 9
! "8 9"2 0 o )
B = B !) B
" D B% 0 Q
!H C >
M % GaC
= B !) G ! ?
B
T + !1
) B
=2 RC !
] Kf
T ?B " 1+ R; 0 T? 9
=2
R; Qd "
?)" C
)
I 9 r +a
d !F
R " d
) B
9
"
.b
)" C %OH! >
) S "! H
y,+f "
y,+f :
0 >
"! H
y,+f :
0 >
"!H
! y,+f :
' ?B S 9 Q
% a9 "
+OH!
+B F & 1+
??B
d !F & 1+ ! "
? >
8 9 M , CB" " !)
?)"
! r 7
7 G
!_ VB
"
Q B
+B F
5 !
CB" " !)
T "!B C " 1+ 8 9 0 !H
?+
rT
+OH! R
8 9 >!
! G C) -
%OH! T)
?$
P$ B %F!H T ) d "
? "!H
F 8 9 r +a
T
& ]"
R;
) d"2 M9 9
> )!+
p
<
!C) ! "
8 9 R; > ! M ,B
) d !) n
8 9 = ! 0 + AD
3b Qa Q7
3b
B% 0
) @AB v
y ! 9 private : 0
" S %
R C ) ! *+
8 9 > , public
8 9 !H B T?B
??B " 1+
%`
+O`H0 & `]
T ""
%OH! >
private G+
8 9 B CIF
& ]G "" C
+a G
F T 0 "!<
I;
8 9 G 0 ? 9 C ) @AB !P " T ?B
d !F
"2
>0 r +a
b Qa
+OH0 & ]
?
8 9
8 9 !H
D
$0
b
!P
!_ " 1+ "
"2
H"
8 9 "!B -A B
t C)
r +OH0 8 9
" 1+
!_ ! 8 9 Qd " 5!
9 ??B
rT )"
d !F
gU 9
R;
=2
+OH0 8 9 0
M >
I$ R $
?B
if
?B
" + !F 8 9
d !F
L" d 8 9
I$ " D
?B
?B u!F
! else
4*fact(4-1)
"
! !0 B "
else
!_! 5!
"
8 9"
3*fact(2)
2*fact(1)"
\!U
3 " Q] - "
\!U . "
!0& ]
"!H
9
! !0 B
,-! "
8 9%
! G = !H " "
!_! 5!
4*3*2*1
fact=T num=n u!F "!B & J
R 0
r )
`a$ T `
+ " !P a
% ` \ d A] G
B T ?B y ! 9 m? !+
9 T ) f !H
T " P
;
)T+
j<
R 9
; (b
G
d !H A7 T ?B
g `] : 0 A7
?B fO
T `?a fO`
;=
` ?B
`
)O
k`n
;:
T 0
I ; )"
% FB )
; G+d > ! T !
%B ! % AD 9 "
;:
"2
!P " : !)
6b Qa " T ?B
?B fO
;V
; !
+
G! ?
!+B B %
fO
% F B )"
>!
6b
`
; T)
%` " R; ! " `
;M
,- M
` V ` 0 " 1+`
T)
T 9
! H !_ !P a
% FB
?B " ) ,-
; 0 " 1+ 8_
!_ VB Va9 M "
; !H
R; T)
; T2?< !K?D! 0
?B )"
7 " A7 %F
Textbox1.text=myarray4[5];
VB ` % S M "
R; Vw
)"
T ?B
y! 9 ]
) m? !+ 0 >
;
T)
!_
` y` ! 9 `B > ` ; 0
Q
" ?B
y! 9>
! 0 B > ! Q _ C = > sF !H
; C
?B
+_
?B
1-16
private void button1_Click(object sender, EventArgs e)
{
int[] str = new int[100000000];
for (int i = 0; i < str.Length; i++)
str[i] = 444444;
}
= cpu
R; 5 9
%
Q7
Q] =
+" T) d
H H >
= > 2B " a?
R; ,d " +d
" 9
U 9 =
= 0 > "
@ "; M
Sd )
2? "
/b Qa
" B
t C)
OB Qa
" B
!_ + " H H >
d fO9 + S N ?B
)O
Qa T) d
! ^cpuN
& DAp T ?B ! de =
! de R; " 644
d A7
)"
"
int
!_ @ ";
44
>
; Q7 T ?B
y! 9>
; +_
+ S T ?B
P?) ^ % Q D T+
* ^L !+O % GaC N
"!B
= : ` G` " 8`_
" T `?B
y n 0 "
<j F
y ! 9 int32 0 : M
d ]=
" ?
"
* =
) sF G
+_
% % (
! de
> ) = " r +a
d !) Qa G
^8*4=32bitNT ?B
"
* y"
/b
R;0 B " " "
"
,-
>0
" <
,- G = " O
R 0 ?
" 1+
) ,;R
"
`?B
%B!- R; R < 9
" `B > `B ` 9
"
; !] ?D M9 M9 >
" d "h B; Qd "
! B% & ]G
T)
,- G "!a,CD
M !] ?D G >
?B !
! %B!-
!) " [2]
+
R; Qd "
B% G
T
,- G
,C 0 %
? 9 " 9 ) ,- %
=0h >
">)
; >!
p%
=0h
(b
for
` " 1+`
MessageBox.Show
`? " ` = 2 > B ! B %
"
" 1+
0 " `
d"
"
MessageBox.Show
!< ! B 0
0
?B
,- h
*< +
S
)O 0 ?
B "
d !H r +a
d !H G ?lC) "
" B Q F R"!B <
r 7
M` `? > `
" ` ; A7
?a QCD >
?$ V !9 M ? >
+F " + ) y ) x
>+
?$
; r>
" B % >
?$
" V !9
!`+CB V ` M
[5,5]
: ! !1] 0
;V
B "R $ +S
[4,4] Q7 T ?B !Be
r T ?B
QCD ! 0 Qa
? R; R
)"
>
"
; y ! 9 >!
; )"
> ! r +a
r 7
?B " 1+
9 " 9 > ) ,- 0
I; R
d >
?$
}
}
}
r ?B " 1+ foreach ,- 0
TI C > ! R
!H
`) `9 G `
` d B M` " u!`F T R + !
I?
`a? > !
>" 0 "
?B " ] R !
T`) +_
`B %
?B S 9 +-
?B ! C 9
" ; "
T)
! R 0 "
` @AB R; R "
" 1+
> ` t_ 0 T +`
T "
d
+_
R0
G`
=`
G`
T ?B " 2
9 >" 0 "
R;
9
t_N +C _ = B !) " B
H"
I; 0
"
? H
9
"
y ! 9 @AB M
a T + " 0 R;
9 R; " B T?B
y ! 9 door =
@AB M
0 >
! G
!P " @AB M
t_ B
QCD & ] G
m
@AB
! "
9 ! C 9 >!
? T ?B
y ! 9 R; 0
9 R;
> B
+-
)! 9
%_ !) B G
T ?B
I;
? G
^object-orientedN !H
R; 0 " 1+
""
d B ?B u!F h - \ d T
R C ) B T ?B
!
?
d B
0 ^>
9 ] ) d
* Y1+ %g"
A7` T `
T ?B
t_ G+ "!
M T ?B " 1+
y ! 9 G T ?B
" T ?B " 1+
T ?B
T ?B
y! 9
y! 9
<
! R; "
G
M+ h
= ` ` @AB M
"!B [3]%
M ,B "!B " 2
?B F U
b
)" ! *9 color
" d @AB =
fS"
"
using
using
using
using
System;
System.Collections.Generic;
System.Linq;
System.Text;
namespace WindowsFormsApplication33
{
class color
{
}
}
8` 9
$ !) T 9
h-
" 2 m @AB
r 7
class color
{
public string clr;
public int Weigh;
}
`CD !H
+ "
9 T "!B y ! 9 R0
` R `9 ` @A`B G C) Qd "
FT
+ "
m >!
CD ! *+ "
!+ "
! " I;
T+
"!B -A B
9 C T "!B C y ! 9
T
M` ,B
" R; > N ` ?B
T `
@A`B =
r! 0 B Q7 T )"
=2
`d !F
R; M` ,B "
)" !_ CB" M
B% & ]G
R"!B new QCD
B
T
t C)
+ "
! =!F >
?B " 2 m @AB 0
@AB = > ,
!+ " I ;
! h-r
fS" =
^ ?B
M
m`
` 9
+ "
?B ?B )"
mycolor
, B 44
R; R0
0 " 1+
"0
r )" !_ VB % a9 M " I ;
R C) 0 " 1+
>!
d !H % G
B u!F
M
!2?< 0
!+ "
??B " 1+
?B
d !F
9 C
"2
CB" " B , _
? + C) 9 ?B y ! 9 0 0 { d "
C) 9 ?B y ! 9 { d "
T ?B
R; M ,B "
y ! 9 ^ CB" M ,B "
r 7
) ! *+
y! 9: G
solution explorer
! !P " CB" M
?B " 2 R; 0
@AB
,_
? H
Q7 N 8 9 M Qd "
? H
!+ " I ;
CD > )
! *+
t C) r +a
+_
-r +a
M
!+ " > !
) ! *+ , y ! 9
+ "
!+ " ? +
)! *+
R; " T ?B
\ f+ door
System;
System.Collections.Generic;
System.Linq;
System.Text;
namespace WindowsFormsApplication33
{
class door
{
public int numberOFdoor;
public string NTire;
}
}
R; =
" 2 door =
F T ?B
!P " @AB M
QCD Q _ L
Q7 @AB
r 7
?B " 1+ R; 0
?B " 2
@AB G 0
r! 0 B Q7
"!H!
>!
" D " 8C
B ?B F U " d @AB
8 9M
class door
{
public int numberOFdoor;
public string NTire;
public int MYT(int i, int f)
{
return (i + f);
}
}
? CB" > !
!0 B
r>! E
`a? !`P
!`H
`
E
7 G
+ "
""
` R; 0 " 1+`
`
!+ "
+1H
0!F
T ?B
AB =
F @AB !) ?B
< t >! E G
y ! 9 door 0
% ` ! `< R `a VaD!
T ! E R; 0 T ) d
S T
M
+ "
T ! E !P " @AB 0
+_ T ! E
!+ "
-A B
@AB M
color @AB
+ H : % AD @AB = > ,
t C)
,d " > sD
T 9
B% & ]G
>!
rQ7 T
namespace WindowsFormsApplication33
{
:color
class door
{
public int numberOFdoor;
public string NTire;
public int MYT(int i, int f)
{
return (i + f);
}
}
}
r @AB
T `?B ` " 1+` ^N %` AD 0 !`d; " T ?B
0 T `?B )"
@AB Qd "
M` y ! 9 > ! %
^
y ! 9 @AB 0
) ! *+ 8_ R C) T ?B
y ! 9 8_
+ !< Qd " R C) )
y ! 9 @AB = T) )
+_
y! 9
"!B -A B
M
R" + !F Q
t C)
+_ T ) f !H \ d
T ?B
" 1+
class color
{
public color(int i, string j)
{
this.clr = j;
this.Weigh = i;
}
public string clr;
public int Weigh;
}
r 7 T ?B
)"
R; @AB 0
M y ! 9 8_
?B o- % !+I
"!B " 2
>! E !H B G+
0 Q_
$"
S d + !< Q _ Q7
rQ7
y ! 9 8_
Sd
R;
d !H h -
?B y ! 9 !P "
class color
{
public color(int i, string j)
{
this.clr = j;
this.Weigh = i;
}
public color()
{
}
public string clr;
public int Weigh;
}
!`P " M`
`?B " ` 9
C` , H"
!`) > !`
`)
: G ?$ ? % R"!B S
d = ,= Q
) & KfO
; G ?$ B % ?
` ?B y` ! 9 k 9!9 G C)
BG
H"
@AB 0 " 1+
!` de ) object 0 >
B
M
d = >!
%
; " T ?B
dL
y! 9
2O "
?B a$
;M
" P
= >!
A] G
d !H A7
9
!_
; M A7
?B y ! 9 KfO
B ?B )"
M 2O " !) > !
,C 0 r
I; a
) =2
a
;M
T ?B
" ` 9 `
`B G
+S
?B
! de " d "
M B % int ?
" " T) d g U 9
R;
object r +a
B ?B ! de ArrayList M
'
`_AD & ] " Q S
!_
1] >
.4b Qa z t
! VB % a9
)" !_ =!F >
?B " 2
! M
! ! de CB" M
)" !_
! r
a? > !
1] "
.4b
! 0 B Q7
using
using
using
using
?B " 2 stud =
@AB M
System;
System.Collections.Generic;
System.Linq;
System.Text;
namespace WindowsFormsApplication34
{
class stud
{
public string Name;
public string Family;
public int StudNumber;
public int Tel;
}
}
?B " 2
444
;M
^M ,B "
N ?B M ,B
!) " 9 T ?B
! M ,B
" 1+ V
!)
M 0
rQ7 T ?B ! de
B% & ]G
BL
d " "
! de
FU V
int i = 0;
private void button1_Click(object sender, EventArgs e)
{
object[] MStud = new object[1000];
}
` M`
" !` % " 0
T ?B
M ,B
CB" B %_ !) 9 ="!B y ! 9 { d
r! 0 B Q7 T ?B C new S T ?B
y ! 9 @AB
int i = 0;
stud mystud;
private void button1_Click(object sender, EventArgs e)
{
object[] MStud = new object[1000];
}
` M` `CB" M ,B
"2
!) " B
!) " h - T " 0
B
+ "
G ?$
9 +a G
?+ )
T ?B
; "
a = > " ?$ !) , _
int i = 0;
stud mystud;
object[] MStud = new object[1000];
private void button1_Click(object sender, EventArgs e)
{
< * 8# 0
72 ! # 4 & -*# # , )# #
0
5
////////////////////////////////////////
mystud = new stud();
mystud.Name = textBox1.Text;
mystud.Family = textBox2.Text;
mystud.StudNumber = int.Parse(textBox3.Text);
mystud.Tel = int.Parse(textBox4.Text);
/////////////////////////////////////////
MStud[i] = mystud;
i++;
}
9 VB % S M
T )"
!_
R; T ?B
"2
% & 1+ "
T )" j C VB
& K`fO `9 `
"
`?B 2+ `
2O` "
C` @
?B F U !P " VB % a9 M
`
`9
; !] ?D M9 M9 >
! B T ?B F U
CB" M
+ "
! B% & ]G
)"
?B !
9 +a G
B G >! %
" +
2+
!
F ?B
)O
M T) d
" "
<& ]
BL
= * < " ! ! 2B !)
!0 B=
CB" > !
?B
%B!-
FU B
textBox3.Text = ii.StudNumber.ToString();
textBox4.Text = ii.Tel.ToString();
MessageBox.Show(" '=
");
break;
}
}
}
Get{}Set{}
T `f @A`B 0
R; T ) f !H
?B " 2
set 0 T ?B )"
R; )"
@AB M
@AB "
8_ T 9
] Kd > )! *+ T ) f !H
G ?lC) T ?B
" 1+ get 0
7 > ! T ?B ! de ] Kd ! *+ " T 9
r ?B y ! 9 ! 0 & ]
F
R; Qd "
}
set
{
_NUM = value;
}
}
}
>
` R `C)
value
N T d
)"
MYNUM
0 " 1+
_NUM
^ )" !_ %
!_
] Kd ! *+ h
MYNUM
7 "
! *+ " B %
r ?B "
)"
8_
d !H
set
{
if (value > 0 && value < 15)
{
_NUM = value;
}
}
get 0
)" ! *9
R;
f @AB 0
] Kd
M
r
F ) f !H
7
?B " 1+
?B " 1+
I?9
set 0
!P
F +
d !H
{
this.Str = value;
}
}
r =!F G ?$ 0 " 1+
!`_
?B " 1+ =!F G ?$ 0
d !F = "
d )
! 0
1] R; >
4b
"
! M ,B
QCD
?B
?B M ,B Add CB"
)" ! *9 next
R; % a9
?
1] CB" > !
!0 B
1] !
)" !_
` M ) R;
`B Q7
d !F
?B R I?< ActiveForm.Hide() 8 9
R;
I !F R $ B % & ] G
BL
" 2 I;
=!F +
d !H
r! 0
?B
!
%C _ "
>
d !F
R; show +
?B " 2 R; 0
T)
- "
d !F > !
"!H 0
?B
=!F
R I?<
=!F a, %
d !H
=!F +_ r +a
O +
? = " =!F
Q B
FormClosing
?B M ,BFormClosing
vD vD T) h 8 9
! =!F G+
-"! B B"
!
"
properties %C `_ 0
)" ! *9
=!F 0
"! H !_ j C
+ ! B +
)" !_ FixedSingle! !
`` " ``
1]
d !H
" ! = P?) C
``
O 0
=!F startposition
)" !_ False ! !
! QB
! =!F a? > ! r +a
)" ! *9 CenterScreen
formborderstyle
> ``)
0 FormClosing
maximizeBox
+``
d !``H
=!F TransparencyKey
"
8`_
`
` ?B \ `f+ ^ <N
1] G S R ?D
fS"
"
! > I !F 0 M !) +
!
1] G S R ?D
d !H r +a
1] G
! >!
r )" ! *9
fS"
r +a
" !` 0 `B Qa`
` Mutex 0 `
- "
F C
r[1] ?B " 1+
static void Main()
{
bool boooooool;
d !H
Program
!P " =!F
= " =!F
M =!F 0 +
+ > ! r +a
M
+ >!
r ?B )"
R;
=!F "
S Const
R ? B - > ! A7 "!B
) d " 1+ R; 0
2?
{"
" B ,aO
R ? B >!
?B
A] QCD
% JM B% & ]G
!)
T ?B
" 1+ % J R; 0
-G
) ]
BL
! "
) ]
! " B
? B ) ] >!
R ? B -
!H
?B u!F
! " + J
) d Q- ) % J
T )"
"0 >
!_ R; R "
QaO G
0 "
)" ! *9 y,+f
T ?B
y! 9
0 % F B ) % J y ! 9 > ! T )" ! *9
% J
R; % F B
F " !"
,C 0 T ?B " 1+ R ! *+ Q
7
? 8C >!P "
! *9
"
8_
const
R;
% AD
S %
Dialogs
> !` >
1`] ` ?B !` de
" `B ?+ )
>
) dialogs R C) I? "
) d
+_
!< Q F !
= C 0
"
T 0 "!w I ;
' )" j C openfiledialog
)" !_ =!F " CB" M
openfiledialog
"" j C C
T) d
VaD M B
picturebox
? G
%C _ G
! r
! G = 2 >!
?B
BL
\ f+
? CB" > !
, F !2?< " ! B +_
BG
"
!2?<
"
<
) VaD
F A7
r T ?B
?B !+, F
openfiledialog
" 1+ ! 0 B & ]
d !H
Filter
T )"
!_
? R; Qd "
!0 B
?B M ,B
T )"
! *9
pictureBox1.BackgroundImage =
Image.FromFile(openFileDialog1.FileName);
}
h `- "
j C VB % a9 "
?B
?B T ?9 Qa z t
9 )" ! *9
R; 0
? R; > !
?+ Q F M B >
txt
! ? M
textbox
?B M ,B
! r
,_
richTextBox
7 Q7
` ?B !` de
R;
` ? R; "
" `d
?B \ f+
`fS" & D
?+ Q F R;
?B " 2
opentext
" ?+ Q F M
?B !
"! H! "
1] = C9 9 )" !_ Fill ! !
richTextBox1
dock
d !H
r 7
1`] " savefiledialog M` openfiledialog >
?B ! de
VB Qd " G+
?
BG
d !H
)" !_
System.IO.File.WriteAllText(saveFileDialog1.FileName,
richTextBox1.Text);
}
ColorDialog
"
)"
)" !_ =!F >
! *9
% F S " 9 "
? R; > !
!0 B
B>
7
!
! CB" Q S M
?B M ,B CB" >
!F
)O
2 + 9 ?B \ f+ " d > ! % F m M
?B !
!F
)O
2+
)" ! *9 ! 0 Qa
,_ B -
T) d ? ; )
! Qd " "
Timer 1-12
R;
B B"
%` !C `9 ` )
M` ` J " !) " B
!`_
" 1+ !C 9 0 " O !
! 0 >
? >
B@
! r
M` ,B ` " !C `9 >
^%
]dR 0&
" B
" 1+
! 0 >
"
7 "
! < R a )
!C 9 M
JM! !
? >
d !H
" !C 9 0 %
! G G+
"
!C 9 !H
B G = 2 > ! ' ?B F U VB % S
!0 B
!K?D
!C 9 interval
"
d !F R; "
? = "
CB" > !
! 0 > ) B k 9!9
)"
9 ?B
"
R; +
d %_ !)
?B B
: ! !C 9 9 ?B M ,B & +
CB" >
?B !
!
?B y_ +
true
!C `9
Enabled
`B
R C)
?B B
: ! !C 9 B" d
CB" R
d!H
?B
r! 0 B Q7
)" ! *9
B z !p 0
!C 9
Interval
G ?lC)
T "!B
R;
"
!+O
T 0 "!<
I ;0 " 1+
) T +1H T ?B v
2? "
f +B 8 9
"
5 !
& a 0
" !+O
!
CB T ) f
!H
d!
2? "
!_ " 1+
?$
B" ""
> ) @AB ^ ?B F U C N%
FU
B ! 0 ) " A7
T ?B
R; > 9
using System.Collections;
=2
T+
! 0 B Q7 T ?B " 2 R; 0
System.Collections.Stack Stk = new System.Collections.Stack;
9 "
"! R;0
?B F U
?)
=2
! "
!K?D +O<
+O<
! "
0 " 1+
h-
@AB G "
Stk.Push1;
Stk.Push2;
int i = Stk.Pop;
!K?D "! H
>!K?D T ) d
!H
"
F U R;
!_ !P " !] ?D k 9!9 G C)
%C `_ %
=0h
? %
>!K?D +_
FU
F B ?B " 2 R;0
B ?B
"! H
!_
+O<
!K?D >
>
QCD F!n ?
@AB =
+a G
F !H
GCU "
?
` >
? T ?B " 2
<>)% S
M R;0 % F B
R 9
>0
T ?B F U
! "
R;
myarray.Add(123);
T ?B )"
R; T 9
!0L
myarray[0]=123;
>!K?D %_ !) a, T ?B !Be
?B
QCD >
!` deobject0 >
jS p )
; ? %
=0h B % G @AB G kS
! " R; > ! sF L" d T ?B
S 7 I AB v
Q- ArrayList 0 " 1+
using System.Collections;
namespace WindowsFormsApplication34
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
stud mystud;
ArrayList Mstud = new ArrayList();
private void button1_Click(object sender, EventArgs e)
{
////////////////////////////////////////
mystud = new stud();
mystud.Name = textBox1.Text;
mystud.Family = textBox2.Text;
mystud.StudNumber = int.Parse(textBox3.Text);
mystud.Tel = int.Parse(textBox4.Text);
/////////////////////////////////////////
Mstud.Add(mystud);
}
private void button2_Click(object sender, EventArgs e)
"
) H
F U R;
R 9" !H
7 R C) h - "!B
{
for (int j = 0; j < Mstud.Count; j++)
{
stud ii = (stud)Mstud[j];
listBox1.Items.Add(ii.Name + " " + ii.Family + "
ii.StudNumber + " " + ii.Tel);
}
}
" +
FOREACH ` ,- 0
`?
` )" !` *9 ` Qa` G
button3_Click
2+
CB" B
?B " 1+
"! H
=2
B G arraylist 0 " 1+
"!B -A B
t C)
`B0 Q _ !H
7 >!
` ; `
)" ! *9
R; ^Name N % !+I
R; =
?B B
) !+?B
a? > ! r +a
CB" > !
button3
+ "
! G
!+ " I ;
S * =b
!`2?<
O` !`
" !` ` R + ` ! `B
; j < , d C >!
T+
=+ "#g"
)
p "
. b
..b Qa Q7
)"
U 9
td C
"!B ! F5
! !H
..b
% `a9 0
" `D M B +
>
! A7 %
` G ! ? % m? !+ : 0 ?B
%F " B D
%` " `D : ` 0 g `] m? !+`
` 0 ` 8 `9 G
T `H ` 8`_
$"
"
"" `
! `B T ) f !H A7 T ?B !+?B
r! 0 B Q7 T ?B !+?B
S T) =2
9
+
$T? T) d
B> +
VB % a9 R $ S
! "123m" ?B "
I,-
?B
9
2?
int
?a "
"%
%F " VB
G ! B !H
) 5! 0 " 1+
5! M
Q 9 QCD
"1234" ?
?7+
$"
B % ? Q-
Sd +
VB % a9 "
Q`7
?B "
" D0 !~
% "
9 C & ]G
" ?B "
" D
F! B BT) f
r! 0 B
`B
&Aa` 0
s` T `+ ` % GaC )
!`
` ` G ! ? T ?B
B% & ]G
+ catch Qd "
"
! >!
?7+` `) T "
C+- B T
"
*<
O ?7+
BL
$"
= C9
B s
< R; > !
" R $ ?+
+-
? j<
% try{} catch |}
d R C) 0
? >!P " B
! 9T
?77++
$"
% "
) ?7+
! !H
2; "
? > B ) A]
+
\ d I
)" % GaC
!+?B L
R; B T !
try Qd "
! B !H B T
)" C R;
>
"
7 >!
"" j C! B
r! 0 B Q7
try
{
int i = Convert.ToInt32(textBox1.Text);
}
catch
{
d !H
`B
S T ?B
" 1+
finally
0 "
>! > B )
) ?7+
r 7
$ +
d !H
`I ; `B G+
QCD Qa G
8_
"
"" j C C
T+
o!p 0
*< +
d !H
.3b
r T ?B
QCD Qa G
T CIF
I? T
B -
{
int i = 0;
try
{
i = Convert.ToInt32(textBox1.Text);
}
catch(System.FormatException str)
{
MessageBox.Show(str.ToString());
}
}
"
" + !F
System.FormatException
r 7 T ?B " 1+
o!p 0
* < )"
System.Exception
0 T 9
?7+ : !H
using System.Drawing;
0 " 1+
VaD M G+d
f +B G 0
bitmap @AB
T ?B fO
Q a < R; V
R; m
% FB0
1n
a? > ! % ! "
)" j C
T ?B
y! 9
R; ,] m
Color
0 : M !0 B "
" "
Q a < R; V
Q a < R"!B m
" 1n
m
m M Color @AB
>! m M
T ?B
% FB
Qa < R; 9 T ?B !Be
P " d"
7 > ! ?B S 9
GetPixel>
SetPixel
9 T ?B fO VaD "
; " ! "
B %
,] m
)"
!_ m
R;
r % ! 0 Qa
B "
,] m
!0 B "
7 >!
+ "
!+ " % RGB Q
B ,] m
r T"" j C
9
m
T ?B S 9 m ^.6#.6#.6#N #///.
T 9
FromArgb 0 " 1+
S L
!`
" ;"
`fS" m
"2
fS" 0
VaD M
T ?B
!0
7 "
>
d !H %F!H = 2
)" = 2 R; >
9 ,CD
> ) @AB
+F!H
! *9 256 9 !1] G 0
BG
) Q a < R; m M9 M9 % !+I
" T) m !) %
+d
!
"!B
?B B
RGB ,] m
0 "!< R 9
)O B
t C)
aD > ) Q a <
0 Q a < !) R $
! InvertQCD 9 T ?B
TB .66 Q a < !)
%` ! < R a
`+ =0 "!`w
pixel R
;
`7 G`
`) 0
@AB G 0 " 1+
)" = 2 ! K9 L0 "!<
S + 2 " VaD M
"
t C) T)"
!` "
Q a<
m` 0 B
!F
)O
R; > ) Q a <
? >
! K9 L0 "!<
d !H r +a
! r
" 9
Q aO9 m M 0 T) Q a < !) B %
aD R + R;
C T ?B
,_
"
44
p "Q a<
VaD G
7 "G ! ? %
fS" m !)
!_ m
U 9
Q aO9
#44 VaD G
+_ %
!P
+F Q aO9
+F Q aO9 9 1+ > )
R; > ) Q a < T ?B
` ?B
! 8_
" ?B
" T,_ M
! M " +_ C
^setN " ;
!`H A7`
) d
` )" ! *9
)O
R; > ) Q a <
)" 0
? ;!F G ! 0 B " ?B ! !
! *9
R; B
? >
R; Q a < !)
"
!!
"
fS" m
) d
R;
!H
I$ VaD M
'"!B
public static Bitmap Resize(Bitmap bmp, int Width, int Height)
{
Bitmap Temp = (Bitmap)bmp.Clone();
Bitmap b = new Bitmap(Width, Height, Temp.PixelFormat);
double nX = (double)Temp.Width / (double)Width;
double nY = (double)Temp.Height / (double)Height;
for (int x = 0; x < b.Width; ++x)
for (int y = 0; y < b.Height; ++y)
b.SetPixel(x, y, Temp.GetPixel((int)(Math.Floor(x * nX)),
(int)(Math.Floor(y * nY))));
return b;
}
> 0 `
> ! )"
` " `
T + !F
=2
VaD T ?B
? N "
y! 98 9M B% & ]G
! *9 & ,CD 8 9 T + !F
` y` ! 9 ` !` *9 R;
` Q a < !) 9 "
Q a<M
8 9 R;
9"
,] VaD %
" " ! *9 %
\!U I$
8 9
Qa < !) "
)" 0
!_ B > 0
!_ B > 0
!!
! *9 R;
BL
%
VaD M
,] VaD ^u!D
VaD M %
!_ !H A7 "
!_ B
+
a?
pN 0
\!U R;
!`) " `
` %`B!-
! k 9!9
%f
, d ) s > ! B G TIF
Q a < I$
set R; Q a <
+S "
\!U
"
,]
"
' T ?B % "
!` *9 600*400 `
R; 0
)" !_ j C
r"
R; T `)" = `2
m`
9 ` ,CD R; >
` ; ` h =!F +_ T) d
1] >
d !F R; "
!` `
! M T) d
! picturebox M
+ 9 ?B M ,B
T ?B y ! 9 44#44 VaD M T ) d
QCD G = 2 0 Q _
B G >!
!
)"
B% ? o )
,B
VaD
VaD
!` " `d T`
y` ! 9 R; 0 : M
+ @AB G
9 ,CD R; 0 " 1+
FU
T 9
B" ""
Graphics
AB
@AB G = Q t+
,_>) B0
! 0 B T ?B
%`
> !`
`S " `
T ?B
" `) !` *+ G` 0 `
1] " M$ B Q t+
" 1+
Q7 > $ M @
pictureBox1_MouseMove
T ) ` !_ R; "
"
"
0 ^x,yN
G & K+f B T ?B
r"!B T ) d " 1+
%B!- T ) d
y! 9
CD ! *+ "
int x, y;
private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
{
x = e.X;
y = e.Y;
}
Graphics@AB
R; &
U 9
?B
)O
I;
B%
>!
"> 1n
0 ` ` !`< `9 Q t+ ` M
r! 0 B Q7 T ?B
+ G
B B T ?a
" 2 R; 0 @AB M B %
" 1+
$ = B !) a?
FillRectangle
SolidBrush
! T ! h -
+ 0
a? > !
7 G
"
S %
fS"
int x, y;
private void pictureBox1_MouseMove(object sender, MouseEventArgs e)
{
x = e.X;
y = e.Y;
SolidBrush sl=new SolidBrush(Color.Red);
g.FillRectangle(sl, x, y, 5, 5);
pictureBox1.Image = bmp;
}
?B
?B !
0 G! ? % R < : !
>!
a " " P
: !
a? > ! T Oa j C
" " OF @
+_
Oa
+ " P
1] >
a? > !
dM T) d
MouseUp
R < t
MouseDown
+ "! @
+_
a?
s T
>!
T ?B
QCD Qa >
"! H = 2
@ %
@ i$ CB" OF
d !H
pictureBox1.Image = bmp;
}
}
)"
jd!$ >
& ]
VaD M B >
r"! H
VaD j C
1] 0 B >
! r
" k B!9 B r
rm
Color.Black, LinearGradientMode.Horizontal);
g.FillPath(lb, gPath);
}
r VaD R"!B 1
5 !
Br
G
"
>) B& ]
Q w B
! 9 ?B
BR $
code
r b DLL
! de dll kS _ " ?B
` T ) `d
I; 0 T 9
`I ; G+d `
)O h
"
2?
" B !H
! C) " T 0
) dll G+d
" B
!_ " 1+ "
?B
" 1+
! "
+_ T 0 "!w
dll
) ) C)
t C) =!F @AB
I ; 0 Q D T+
?B " 2 ClassLibrary: 0
?B
! 0 ?
T ?B F U
?B F U
fS" =
@AB M R " d 9 ?B o-
MYForm =
=!F M
MyComputer =
class1
@AB M
"!H
using
using
using
using
! m? !+ M
% 8 9 M B ! 0 B A7
System;
System.Collections.Generic;
System.Linq;
System.Text;
namespace TestDll
{
public class MyComputer
{
public string mas()
{
return "my name is ...!!!";
}
}
}
8 9 T) @AB T)
r
? CB" > !
!0 B
public C+- B
+ "
" " !_ VB % a9 M
9 +a G
"
{ d
! 0
-"
+d
"
C dll 9
` "!
DLL Q F
Build "!B %
! "
M ,B
" 2 2; "
! = >
! B >!
?B ! de
` ?B M ,B
Add references
P$ T ? T ) d
M ,B References %C _ 0
?B \ f+
"!B ! de
" B
?B " 2
" d dll Q F
"
r ?B using
! "
FU 9
)=
using TestDll;
r 7
?B " 1+
)G
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using TestDll;
namespace WindowsFormsApplication44
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
MYForm mf = new MYForm();
mf.Show();
}
}
}
)" ! *9 Qa G
?a F U
)=
d !H
CEDCThreading
`) R; T `9 ` ` P$ % ` $ `) "!9 = I1 a? T 0 "!<
` R"!`B >0
- " +_ A7
?B ! T)
` 9 ` S !) " cpu S
` S !`) " cpu %`
%D!` R $ ?B
Q D T+
BG
)G
1n
B%
`2 ; 0 `B
>
`a
%OH!
"
8 9
! > ? % S G
% " 0
?B T
9 )
"
"_
! G
?B
i 9
GaC
+ "M
cpu > !
cpu %_
Threading0
t C) R $ "
L!< ? T
S7
R C) + ) S
P$ a? V< ) = 2
P$ T ? T ) d
+_
%C _ G "
z !p 0 T)
=2
+S T+
+` " `?$ R C) T 9
` ! G`
! G ?$ B
L H ! ,<
t? C) 8_
T) 0
ID !
T`) `
)"
) "!9 kS
P$ B %
" 1+
a? "
%C _ G
) "!9 !H T ?B !
h - +F!P = 29
"
C) T) & ] G "
1"
+F!H = 2 L!<
T
r
'T)
%S
a? !P
) =2
r ?B F U
!0
) " +
? >
7 G Q- > !
using System.IO;
using System.Threading;
T ?B
!_ =!F >
BinaryWriter
BinaryReader@AB
" 0 io
) "
) radioButton 0
?B T ?9 Qa z t
a
) !+?B
)"
F!
9 B % ? @AB " G
"!9 @AB R $
=
T ?B
" 1+
?) = 2
B T ?B
y ! 9 "!9 @AB 0
> "!
wB QCD B T ?B
" B% & ]G
BL
start
8 9
@AB G
CB" > !
C T +
ThreadStart
!0>) B
t1.Priority = ThreadPriority.Lowest;
t2.Priority = ThreadPriority.Highest;
}
else
{
t2.Priority = ThreadPriority.Highest;
t1.Priority = ThreadPriority.Highest;
}
spead = Convert.ToDouble(textBox1.Text);
t1.Start();
if (checkBox1.Checked)
{
t1.Join((int)numericUpDown1.Value * 1000);
}
else
{
}
t2.Start();
}
%
"
R;
+_ T ?B
" 2 > 1_
" 1+
wB > I 9 " L
G0 "
T ?B
T "!B fO B
Q F ?B " 8 9 "
)O
% S
C ! M9 9
td M " ? %
!
?B
B 2+ 9T)
I, F B % ? I 9 G
fO > I
) "!9
B T
" 1+
J ?$ &
% R a B
Q F " j 0; = 2 > ! ?B
wB
> 1_ 9 T "!B
8 9 ">) B
fO
)" !_
K
!
?B
wB
R;
+- ) = 2
+
P?
Q F0 %
wB QCD +
, B M S !) " B % & ] G
d B%
, B ?$ !)
2+
8 9 BL
"! H
= 2 Q F R < 9 a?
) O >! B G
" S
?B wB
0 " 1+
Thread.Sleep(TimeSpan.FromMilliseconds(spead));
! 9 T "!B " 2
J ,
!1] 0 !H A7
?B
?B
k ?+
dM
! C+- ?B
" 1+ "!9 0
9R
!<
progressBar
" 1+
T ! ]" D
progressBar
?$ &
R"!B F U
BL
progressBar
L" d
) !+?B 0
! " >! d 9
progressBar
!H
?B
3444
9 T ?B : !
B ) "!9
+_ r +a
! 9 ?B ! Ctrl+F5
??B
S !
> I, F
^word,txt,pdfN ?
?+ > I, F A7
"!B
B >" 0 > I, F
+"hg"
h- 9
^mp3,divx,mpegN ?
9 ;
"" j C
S
>0
P$
+d
"!OF mp3 ? H
B > $ R;
! 0 VaD "
" )v G
! de
P$ I, F G
?
T) d
+d
C+- " d R + H
9 ; S
>0
"!OF C,B
"!OF = I1
>!? > ) B ,
B "!B !aF G
I ; >0
exe
! Q F +- I, F C)
! de
! de jpg % !F
?B
a B T?B
C+ T) 0
k,
!9
" % F!n
?B
9 I ; % F!n
"!B
?B P ) VaD
9 [0,0] Q a < 0 A7 %
a [100,100] t
> ! QB " ?B
! de "
>0
L
B T+1H
>!
& ]G
? T) >
!H A7
"!B 0
R;
>0
a?
G ?$
??B 0
! de + !F
R; 9 T "!B ! de
?B ! de R; "
R; B T
" d=
? >
+d
P$
! de
d 0 B T P >0
< a h-\ d
?B
!
T ?B ! de a
! de L
B"
)" j C
% a9 M "
G TIF > ! ?B
7 G ^%
% !F R; B T
P$ jpg Q F B T
"!OF
! de Q a <
9 S
; C) T "
, B 34 " - + F!n
1,+f > ) % !F B % Qa G
+F!P = 2 >0
^R C ;NVaD >h
S !!
a, T?B C ! de L
Qa
k, VaD " !)
; m
B 9 ] " S T "0
"!OF = I1
! & 19 G Q S" %
sF M Q a < !) ? %
sF % . Q a < !) !H A7 %
0 % 64 " - + F!n
F - "
!H T?B
""!H
+F!H = 2 >0
!F s_ jpg " S %
B CIF
! de
!H
! de >!P "
+_ r
9 "! H
? " C R !P " R $
! T 9
^merN
! de
< Q FM r
' )" j C VB
>!
System.IO.BinaryWriter
0 " d>)
@AB " G
BL
)% 0 >
R $T f %
System.IO.BinaryReader
;M "R
?$ %
" 1+ Q F " 2
d >! $
G+
G+
@AB "0
>!
a? = 2 > !
Q F0 R
F System.IO.FileStream
>! $
P+
0 @AB M
p h - )"
!_ )!+B B
T ) f !H h - VaD!
! de
T
"
T? 9
T) = 2 I; >
9 ,CD T f a9 a9 B % 0
R; +
T ?B ! de Q F M "
sF % M x d ) !+B B 0
! de CB" > !
fS"
< =
= Q7 +
s
M
m? !+ M Q 9 > ! T ?B
,P !+B B !) r +a
T ?B ! de % :
%
) %_
"
R; ?CU Q 9 M
Q F M " ! de Q B B ! 0 "
r! 0 B Q7 "
?B 0 notpad M "
_!F ) B ?B ! de
?B % 0
d !H
;M
"2 C Q F
Q 9 +
d !H
{
_BY[i] = (byte)_CH[i];
}
_BiWr.Write(_BY);
_BiWr.Close();
MessageBox.Show("Finish");
}
)" j C
?B 0
>!
Q FG
BT
>
"
A7 "
!9 w B "
% "
R; >!?
% "
I; "
"
?B .! T
9 S +
?B F U !H k 9!9 G C)
=2
?CU Q 9 R $ S
$ C) T +1H B
/ " D +_
B%
t C) r +a
^a=97N!+B B
) d
" ; ) d
"
Q 9
r T ?B
o !-
?B TB 9 3. !+B B !) 0 !H r +a
u D Qa G
B ?CU Q 9 M h -
h-
?B 0
Q F& +
Q F
+
H"
H"
B M T"" = 2 h - 9 B > B
B
> "
M T) d
?
?B P %_"
T ?B M
!H
% a=01100001 !+B B
% R;
7 u!F ! !H G ! ? % !1]
"> $"
,P o !- "
"h
,P !+B B .# C) !d; %
!P " > ) !+B B
" B
B
t C)
CIF
Q 9 ) !+B B G !P "
T ?B
!1]
"
!d; % R; T ?B 0
Q FT) d
R " d +_
T "!B ! de
T !
) R; R
d 8_
" T ?B
or ,and Q] -
!H
^ N OR ^10000000=128N
% "
9 T ?B
B"
,] !+B B
C
9
^&NAnd ^01111111=127N
T " ;
I ; Q] - ! 0
"
r )" ! *9 Q
? ;
,_ B -
CIF C
$ ) !P " ?B 0
Q F
B !H !P "
r )" ! *9 Qa G
j C B -
S
R 9" d
h
d !H " Q F R"!B
" !H A7 > P
> ! T)
D
>0
a, "
>0
"!OF > ! T)
"!OF T "!B Q- h
" I?O <
7 " B> $
) T+
PS
R ?D
B T)"
gU 9
= 2 >0
"!OF
^ % R 9" d
% G !d; "
% %1) "
% !1]
computer %
. b Qa
?B o-
ID! G !C9
& ]G
r!+B B
!H A7
?B ! de
. b
r> P
G
> ! T) >0
) =2 & _% I
"!a,CD
! T+
O : !+d
PS
T )"
BG
Rijndael
Rijndael
T+
0 !+I
PS G
T "0
r ?B a "
@AB
C+
" d G+ R"!B
PS ) R ?B 9
+ .6#
G
" ; @AB G ?$
Rijndael
>!
: !+d
T+
?B
PS 0 " 1+
7 >!
" T+
B% & ]G
"
PS
T+
PS G
"
G+
?+ M r
! Qa
9
R;
R;
! G
Qa
G+ > !
2?
" ?)
t C)
m? B & ,CD
=2
R;
9 +a G
?
" B
CB" > !
)" ! *9
! B
using System.Security.Cryptography;
using System.IO;
private void button1_Click(object sender, EventArgs e)
{
Rijndael RJ = Rijndael.Create();
string strRamz = textBox1.Text;G
#!* * 4 !3 ;
string StrMatn = richTextBox1.Text; H" G
string FileName = "CText.txt";8
* G 8J6I 4 !3
char[] _ch = textBox1.Text.ToCharArray();
3
byte[] _by = new byte[32];
for (int i = 0; i < 32; i++)
{
_by[i] = (byte)_ch[i];
}
)
3 ;
B> "
! Q F ?B " CText.txt =
"
d !F
Q FM >
EncryptTextToFile
B ?)
G+ ! de CB" "
=2
R"!B a
1n
,]
r[1] % ! 0
public void EncryptTextToFile(String Data, String FileName, byte[]
Key, byte[] IV)
{
try
{
// Create or open the specified file.
FileStream fStream = File.Open(FileName,
FileMode.OpenOrCreate);
// Create a new Rijndael object.
Rijndael RijndaelAlg = Rijndael.Create();
// Create a CryptoStream using the FileStream
// and the passed key and initialization vector (IV).
CryptoStream cStream = new CryptoStream(fStream,
RijndaelAlg.CreateEncryptor(Key, IV),
CryptoStreamMode.Write);
// Create a StreamWriter using the CryptoStream.
StreamWriter sWriter = new StreamWriter(cStream);
try
{
// Write the data to the stream
// to encrypt it.
sWriter.WriteLine(Data);
}
catch (Exception e)
{
MessageBox.Show( e.Message);
}
finally
{
// Close the streams and
// close the file.
sWriter.Close();
cStream.Close();
fStream.Close();
}
}
catch (CryptographicException e)
{
MessageBox.Show( e.Message);
}
catch (UnauthorizedAccessException e)
{
MessageBox.Show( e.Message);
}
}
r R; 8 9
!C) j C CB"
% 5 ! !0 B
{
try
{
// Create or open the specified file.
FileStream fStream = File.Open(FileName, FileMode.Open);
// Create a new Rijndael object.
Rijndael RijndaelAlg = Rijndael.Create();
// Create a CryptoStream using the FileStream
// and the passed key and initialization vector (IV).
CryptoStream cStream = new CryptoStream(fStream,
RijndaelAlg.CreateDecryptor(Key, IV),
CryptoStreamMode.Read);
// Create a StreamReader using the CryptoStream.
StreamReader sReader = new StreamReader(cStream);
string val = null;
try
{
// Read the data from the stream
// to decrypt it.
val = sReader.ReadLine();
}
catch (Exception e)
{
MessageBox.Show(e.Message);
}
finally
{
// Close the streams and
// close the file.
sReader.Close();
cStream.Close();
fStream.Close();
}
// Return the string.
return val;
}
catch (CryptographicException e)
{
MessageBox.Show(e.Message);
return null;
}
catch (UnauthorizedAccessException e)
{
MessageBox.Show(e.Message);
return null;
}
}
> +
+_
? % %OH! Q _ T+
IC+
! hash B %
"
! B%
?$ C
?$ C
?+
%OH! Q _ a?
" md5 T+
) %
"
= 2 Qa G
+_
"
R;
1] ] ?$ \ +B M !H
!) ?
PS G
>
"!F
?B " 1+ R; 0 %
!K ? ) B G
"
" C
R $
>!
" RAD C
B md5 T+
?+
"!H
S
"!H
+_ A7
! de )
B C
% rijndeal md5 T+
"!B B
+-
0 T) ) " d +- "
,_
PS r +a
" B ^ MD5) ?
sD ) %
"
7 " B C+
+_ T+
DAp C
)O h
"
) %
" !F
"!B a "
BM +
& ]
G! ?
> +
!K ?
? " ! ! !H
B
PS G
" K_ C
> B R C) "!
md5 & ]
R;
) T+
PS
% % " C
S 9
PS
PS M
0
"
9
B "
!
PS 0
PS 0 " 1+
9 ,f
"!B
;"
? "! H
M !0 B "r
BN
>"
B +
"
?B QCD ! 0 B Qa
" ! ! !H
T)
"
>!
^"
K3 ,
S
"
R;
QC-
?B " 1+
Q F R; 0 = S 8_
! Q F !C) ! "
> I, F B & ] G
Add New 0
> I, F
" 9
?B F U
=2
a?
!
!
+_
^SetupN kK > ) Q F %d
a? = 2 > ! T ?B
F U !P "
Q FM
; D O
d %_ !)
?B ! de Resource File
B G TI > )"! B 0
! M "
?B F U
6 +
a "
!
^3N
Add
Add Resource %C _ 0
^. N
0
"
^ N
Existing File
?B F U
VaD " A7
FU B
!
I, F
%K R + !
+_ 9 ^ )" ! *9 kK
! Q F % F!n "!B Q w B
> ! a? !P "
" )"
mp3 % !F
! de
wB F - 0
!
" ) VaD 0
! de I+ 0 >
a?
+_
j F
a
"!B
"!B M ,B R; >
;& ]
" VaD C Q F !H
?B
"" = 2
! CB" M
Q F " I+ 0 >
R;
!P " Q F M R + > !
I, F G r +a N
7 >!
+d ?
;& ]
& ] G !~
^ ?B F U
" %C _ G "
r T ?B
wB d
" 1+ !P " R a
"0
aD r
r 7 "
" 1+
!H "
" 1+
+ G 0
" ""
VaD!
"!H
! true
+ G % ""
, F
r
?B
"!B T ) d Q-
G " S7 A_ B"
" ,B 7 ,
" 1+
" '"
?+ > I, F " G+
" 1+
< ,] Q F B & 19 G
I, F = ! *9 > ! + G 0 r +a
> ! rSystem.IO.File.WriteAllText
T "!B Q-
"
" 1+
+ G 0 !
M "
: System.IO.Directory.Delete
"
" 1+ !
" 1+ !
>! + G 0
System.IO.Directory.GetFiles
7 "
fO !
" .exe
I, F r
7 T ?B " 1+
+ G 0
2+
>! T 9
G ?lC)
r
= C9 "
wB
! Q F B
!)
! G
"
" )" ! *9
" " ! *9
I, F 0 >"
fO
<
< B
? >
! Q FG
R; Qa
?B > I, F
! G = 2 >!
.#b
r
!0 B
{
string x;
string io = System.IO.Path.GetFullPath("changeExtention.exe");
0 !P
!. 7 #
!>
O
*
J/ ) N getfullpath 0
R c:\\newfolder\\changeExtention.exe
&#
7 )
3 8 !Q
O !67 O !3 3 T
'3
3
J/ O
H6 # 4 SH
<'& 6
'3
3 WM 6 J/
, <' *
UV? replace 2 8# 0
3
)
c:\\newfolder
x = io;
io = io.Replace("changeExtention.exe", " ");
# :'
$
8J6I
=F J/
6 #
3 J/
*J/
3 8 !QF4 SH
string[] _M = System.IO.Directory.GetFiles(io);
O
6 # *
!>
# 6 ;> 3
*
'= )
) N
J'X,
SH
) N
rSystem.IO.DriveInfo
"
" 1+ !9 w B > )
> ! @AB G 0
r
^ % F!n % !F : N
% "
!9 w B ^C)
r ?B QCD
]G
!9 w B > )
d !H
>" @ = ` f +B `
: `U
" 2+
?B
I ; C) R CIF > !
f +B G " ?B kK
R;
?+ ) 8
+
< I ;0 " 1+
>)
kK 8_
f +B
R
9
! "
rUserControl
A7 %
" 1+ !+O
I !F C) > !
G 0 9
"
" 1+
S % !+O I !F C) " G
+ " =!F
) !H B "
R; 0 & 1] C) "
"!B " 1+
T ?B
G! ? %
% " R; 0
?B 8C T)
F!] A]
a B % UserControl 0 " 1+ L
T ?B
?B add
R; B
" 1+
B >!
r! 0 Qa z t
)" !_ R; >
0 "
> ) !+?B
? CB" > !
" D " 8C
B 7 >!
Qa M "
Q w B td R
)" !_ R + I !F >
!H "
Oa
+d
R;
user control 9
"
!) n
?B Build
2+
? user control
?B !
%D
! r
VB % a9
?B F U
clock =
user control M
, _ G !C9 Q7
^"
F !C 9 load "Nr
? !C 9 load > !
! !C 9
!0 B
r )" !_ R + I !F >
! %D M
?B build
>!
"!H
T+
R 0 Q B & KfO
J , 44 !) " B % ? !C 9 B B T )"
+- )" j C
R; "!B ! *9 q 9
DateTime
@AB B % & ] G
!_ !C 9 M T
R 0 !H 9 ^ )" ! *9
! label
Nr ! 0 B Q7
R 0 S!) " a?
! R 0
?B F U
BL
N"
! G
!
q 9
0 ? ! ,<
?B \ f+
a? > !
?B jf< ! B > !
choose items
"!B %
M ,B
)" OF
Oa
R; "
!) n
P?);
! " B
"0 &_
" a? = 2 > !
ok CB"
?B \ f+
)H
?B " 1+
! ,<
" Ga ; M
)" ! *9 none
R; uiMode
?B false
?B jf< k 9!9
m?); " d
=!F R ; h 8_
)" !_
; "
r! 0 B ?
$) +
?B F U ! ,<
jf< % S
d !H
d !H
!0 B
; a? > !
)" !_
?B
?B jf<
0 %
B>
! !H
?B jf<
>
>)Q FT 9
9 B % ? ! ,<
! Q D T+
>
"
r +a
a?
?B C
0
kK
?B jf<
>0
^ wavN % !F
9 ] > I, F
" d > I AB
B ?B " 1+
?a " 1+ ! ,<
+-
B +
+
d !H
System.Media.SoundPlayer
r% !0 B & ]
@AB G
BL
,C
@AB
! ,<
?B y ! 9
CD
@AB B p!
?B y_ +
m?); jf<
> CB"
d !H
`? G `C) ` %`
>
" d!
! de > !
h % C) 0 I ; >
! de
,C 0
! >)R 0
" ; T) !F
> " `B "!`B
0 " 1+`
QB
` `9 T +
V B
R 9
"! P
!_ " 1+ "
0 !
0 !
9 DAp M
B 9 DAp > Ia
! de > ! h % ?
k ?
,C 0
)" R 0
& ,CD G
T
b.Qa
= ` M` ` ?B fO`
> !` T `?B " 2
R; >0
B
! de Q
R; %
9 DAp M =
?B fO
B"
R; >0
? H>
!< C 0 B G 0
! de !
?B \ f+ R; > !
0 !2?< " % F B B G
9 DAp M
- !p
M` T+
" A7 T ?B fO
G ""
!t 2O " >"
9 DAp M
!C 2O "
?B M ,B
2O " =
!C
"
C >) ,F
\ f+ +
: 0
.b.Qa
% ` F B ) `, F T `?90 ` T "!`B T ?9
`B G`
?B \ f+ " d
>! = M B "
>) ,F
?B
) O 3b.Qa
" B
t C)
!2?<
!< C 0 !2?< G+ 8_
{ d
=2
3b.Qa
= h- 0
>!P "
C`
"
`
" `d
T ) `f
?B QCD z !p G C)
" ` ?B M` ,B R; > ! % F B
` > !`
9 DAp
? ;V B
V B R 0T 9
) O >!
2? C) 0 %
B G`
B T )" = 2
+ "" T ) d g U 9 >
O "
G
R + ! !H
F U !2?<
R; " 9 DAp 0 ?) R $ %
o )
?B
)O
Sd
& ! *9
?B
z !p0
QKF " B v
" 0 Q_G ! ?
"!B T ) d B V B R 0 !+O
"
V B
G
" 9
U 9h-
) O > ! T ?B >0
" <
^ ? ; V B & + " NV B R 0 h -
?B >0
V B R 0
?B \ f+
INSERT
!Be ! "
!0
+ " G+
A7 "
" 1+ V + "
b.Qa z t [1]"
+ "G 0
FU
+ " "
b.Qa
" 1+
+ "G 0
" 1+ % "
R; =
T P A7 T ?B F U R C9 + "
s`
" !`H `B ` ?B ` 9 `
5!
`+a G`
" !F
)O h
` %` " ` R; =
+ " " B
B GB o-
t C) GCU "
0
)!t
+ " " !H A7
?)
!_
! "
)!t QB T ?a "
"!B
p! & + "0
<
) !t
UPDATE
u `D
Kf
2O "
C T+
d !H A7 [1]"
" 1+
" ! *9 > !
T ?B
" 1+
+ "G 0
+ " G 0 T ?B
` T `)" ! *9
R;
T) d
>!K?D !H B T
T )" ! *9
+ "
R;
+a G
T 9 C
T)
G "
\ f+
,B R ?D
SELECT
= ` > `) R +` ! 0
+ " G+
A7 "
" 1+ R CS
) R + \ f+ > !
"
+ "G 0
\ f+
2O "
SELECT name
FROM Table1;
" 1+
V `B help ` ` 9
,] & + " R ?D
I ; R CIF > !
) R; 0 )
?B " 1+
I; 0
! !+O
9
" B "
B" ""
9 + " )G
>!P " kS
?B
_ ` + S T "!B
V B "" P <
U 9 I?
)
# A'3 0 # 4 & Y+*
!
I` AB
" T `?B v`
Q`] SQL `,C 0 !P " > ) " " P < V B " " P <
`I ; >
& ,CD
""
+ ! "
"" P <
T 9
"T) d
I ;0 " 1+
QKF G "
B" ""
& + " B % G I AB G
1n T
C >0
" ` < !` " ` " " `P < > ! T " " g U 9
R; Q _ QKF " B
T ?B
insert
" 1+
+ "T+
" <
d !H A7
) @AB G 0 T ?B >0
System.Data.OleDb
> !`
+F!H
`)" ` = 2
! "
"" P <
System.Data.OleDb
)G
FU
) @AB T+1H B
R
t C)
Q]
?B
B =0h > ) ) b3 Qa
T 0 "!<
) )G
OleDbConnection
` ` T ` ?
@AB `
`B G` > !` `B
" 1+
"" P <
Q] > ! @AB G 0
+_ T
T ) `d v`
M` ` 0
`
R;
` ">
%C _ " B )"
=2
" ; R; 0 ` C M ! 0 " % R;
BG
>!P "
,V +" = Q
- "!B
G % ConnectionString
"
5 ! B%
Provider=Microsoft.Jet.OLEDB.4.0;Data Source="C:\db8.mdb";password="456
% .443 A7 %
%C _
?B
$0 G V B :
"2 V +"!
B"
fO Microsoft.Jet.OLEDB.4.0 %C _ "
`B T `P
?B u!F T ?B
"% V +"G
)L
G0
c !< M
B
a
B T CI1 2B0
!0 "" ""
G R" ; %
` ?B " `2
"" `
"
database ? H >
"
B .44/
5 !
B ;j<
`? 0
next
- "!B ! de F -0
!d;
! .b3Qa z t !2?< G
.b3Qa
"
`? H >
? H>
>
!`
!` `
Q] sql
+
+
?B \ f+
d !H
` ?B wB
!` de R; "
R;
G
CB" >
b3Qa z t
?B "
?B
" B"
!2?< "
"" P <
!2?< G
?B M ,B ok
" d ! "
d !H !2?< G
"
` ?B \ f+ change %C _ 0
1`] " `
`
`+_
)O
V B
+_
V +"Q F B ,
R;
?B M ,B browse
password %C _ "
ConnectionString
"" V +" Q F
9
!) n
?B " 1+
! " 9 [4] ?B
1] 3b3Qa
b3 Qa
!F
)O
& 19
)" = 2
" 1+
%`
R; connectionString "
`B `
!`_ > +`
` !!
B G % !+I
P$ oledbconnection @AB G 0 T ?
" 2 ! 0 z t R; 0
R; R" ;
R; B = 2 0
T ?B 0
?+ ) ! 0 !
> + "T+
R;
co.Open;
//insert code
co.Close;
OleDbCommand 3-3
=2
R; 0
BG
B" ""
M B% & ]G
T +` !F `
@AB G 0 " 1+
% OleDbCommand @AB G =
R O @AB G
t C)
insert
+ " G+
T ?B
)"
"2
R; " B ! 0 B z t
"
! de
B % G T ?B
R;
B > +a
OleDbDataAdapter 3-4
M` % F B
" 1+ DataTable
r! 0 B ? [3]T ?B
R; Fill +
?B " 2 R;0
`$
I;
2O "
B ?B
!<
)!t
V +"
)"
R;
!0
B " B
td
+ " " A7
?B !<
R CS
(6
DataTable 3-5
G` T `?B ` " 1+` @A`B G 0 T
+` "
+ " R; !] ?D
> !` T ?B !< R;
T
+ "
" 0 %D!
+-
dataGridView
?
"V +"
T 9
?B
T +
0
QCD >
wB M T +
"
;& ]
a? > !
@AB
! 0 B 6b3Qa T )" !_ j C
1] "
dataGridView M % F B B G
//Filldt
dataGridView1.DataSource = dt;
?$ + S ?)"
=2
"" T) d g U 9
""
I;
P <
"
! " " 1+ 8_
"
QKF " B
""
) @AB ) G
!P " "
@AB 9
) @AB = % F B
d !H r +a
// SqlConnection
// SqlCommand
// SqlDataAdapter
?B QCD h > ) 7 Q7
r ?B ! de V + "
G`
` ` ! G` "!B `B `
G ?lC) "
FU RC
?B T ?9 ! 0#b3 Qa z t
M "
+"
PO " "
"
>
! r
! >!) n Qa
a? = 2 > !
> 2O " +_
B% & ]
I B % a9 " B
?B <
? >
g K9
" ;
#b3
?B " 2 project.mdb =
2O` " >"
=!`9
V +"M
H" ` d = `
=`
a? > ! T ?B % "
2O` "
R CS
B ,-! "
?B % "/b3 Qa z t
/b3
+`
d !`H " `
` ! Q` F `?B
d !F
= G
R; V + " %d
" 9 ?B ! de stud =
)" ! *9
fS"
"
!Be > I
9
r ?B wB
"
F new CB" OF 8_
F )" C = 2
T ?B
y! 9
9 ?B
F ! ~ Insert % a9
]d B BT
new CB"
?B
<"
CB" + "
5 ! >) B
& ] "
VB
{
con = new OleDbConnection();
con.ConnectionString = strcon;
cmd = new OleDbCommand();
cmd.Connection = con;
@
Z <' 0/
]
# * $\ 'H- ! # ) [
O
4
;
H_ 2 <'&#
) [
* O
&^
aaa<' *
Z 8# # 8
= 3 ;' A1 % `?
F
#!*
= 2 8#
O
3 <'
Z
0
,
4 !3 ! #
3 1H3 <' *
* /
FU
! G
r"
\ d 5!
Q- ! 0 B
?$ ? T ?B
B
!+I
BG T! >
> ) B !
a? 0 A _
9 T ?B
* L 3 4 &
Q
}
= 2 > ! B % "!F
> !`a9 !H 9 "
!K ?
!
2O "
> 2O "
C R $ ?B "
C R; " B T
> !a9
2O "
,-
C ! B
=
8 9M
) %OH! .%
a?
"
=2
R; >
! `B `B
DataTable
V B & + ": 0 +
C !H B T "!B QCD Qa G
!H G ! ? )"
!_
R"
DataTable
M "
+ ""
G` !` ~ " " `
r% & ]G
8 9 B "
M B% & ]G
8 9 BL
?B
\ f+
A_
R; "
2O "
+
" ?B
"
C G C+- V<
!<
"
2O "
C G & ]
)!t` & `] G`
`?
"!`B fO` ! B B
! `B 0 = `* < M ,
`B L
^/
2O "
BG 0 Q_ S "
! ! R;
fO
2O "
2O "
B ?B
C
?B < ) d
5 ! >) B
<
R CS
!<
try
{
if (textBox4.Text != "")
{
if (MessageBox.Show("Are you want to delete", "?",
MessageBoxButtons.YesNo, MessageBoxIcon.Question,
MessageBoxDefaultButton.Button2) == DialogResult.Yes)
{
con = new OleDbConnection();
con.ConnectionString = strcon;
cmd = new OleDbCommand();
cmd.Connection = con;
con.Open();
cmd.CommandText = "delete from stud where
studnumber=" + textBox4.Text;
cmd.ExecuteNonQuery();
con.Close();
textBox1.Clear();
textBox2.Clear();
textBox4.Clear();
studAtr_Load(sender, e);
MessageBox.Show("delete");
}
}
else
{
MessageBox.Show(" ]: # 8 c Y
!3 #!* d =");
}
}
catch
{
MessageBox.Show("Error");
}
}
2O` "
C`
N A] QCD B ^0$!%
CB"N
QCD
5 ! >) B
% ! < R a
r{ !d CB" B
private void button6_Click(object sender, EventArgs e)
{
this.Close();
}
]:
""
!< !H
=!F R ; h 8_
d !H
B"
!H
! @ M ,B
CellMouseClick
"
d !H
"
!0
{
textBox4.Text =
dataGridView1.Rows[e.RowIndex].Cells[0].Value.ToString();
textBox1.Text =
dataGridView1.Rows[e.RowIndex].Cells[1].Value.ToString();
textBox2.Text =
dataGridView1.Rows[e.RowIndex].Cells[2].Value.ToString();
numericUpDown1.Value =
Convert.ToInt32(dataGridView1.Rows[e.RowIndex].Cells[3].Value.ToString());
}
catch { };
}
?B
)O
B 2+
?B !
$ % & '%
[
??B I > )
[bQa z t T ?B
! "2
(b3 Qa
0 " 1+
" 2 >0 ?
# "
>! H L H
! M
a? > !
C M ,B bQa z t 1 *
!2?< "
b3Qa
?B M ,B
0 "
> ) F =! 0
2% ! >
9 DAp M M
! %!!
A _ GCU "
="!B " 1+ %
"
!0
0 2? G
)" = 2
?B M ,B
fO CB" >
1] G " 4b3 Qa
4b3Qa
b3Qa
.b3Qa
CB"
5
c !< >
?B M ,B 34 >
!
! %!!
Q FG 0 f M ; B"
!2?< "
!< C 0
!) n ! 0 !2?< 9 ?B M ,B
CB" >
! T)0
"
3b3 Qa
?B M ,B .
+>
?B \ f+
) f
b3
6b3
#b3
/b3
?B M ,B .
+>
?B \ f+ >
1] "
" d ! "
(b3
WbQa z t
?B M ,B " d
! =!F >
b3
.4b3
?B !
. b3
F U >! h > )
)" = 2
9
fS" & ,CD
?B
) O =!F > !
>
R"!B
..b3
" 2 >! H L H
! M
H"
T+
BM
+- G+
"!B -A B
t C)
T C
/b3^ % 6*%6
" 7 > ) R 0 >0
0 >!] ?D \ f+ > ! R; 0 T 9
" 1+
9 1+ > ) B > !
7 "
T "
+ " G 0 " 1+
U!D
+ "
T 9
6 % ! * -N
.44(
7 R 0 " B
T)
0
t C) %
" T ?B " 1+
R; { 0 " D
7 0 " 1+
T ?B
y! 9g ]" D 0 >
; 8 9 !0 B "
^
7 > ! T ?B
N T ?B
\ f+
)"
! de " d "
R; : T ?B )"
: 0
R; :
7 "
! *9
:%
+_ ! 0 B "
C) B ?B
R; : T ?B )"
QCD ! *+ M ?
7 > ! ?B
+
%
:% r +a
! *9 R; : "
R; +_
"!B
< ! *9
! *9
0 >
var i = 9;
var j = "str";
T )"
=2
7 G "r
var mySelect = from user in users where user.Age > 20 && user.Age
< 30 select user.UserName;
foreach (string uname in mySelect)
listBox1.Items.Add(uname);
}
public class User
{
LINQ to SQL
B %d ; T ) d %C _ G " % sqlserver " " P < 5 9 linq y n 0 !P " a
!`_! 5 ` 9 sql " " `P < !9 = C9 $ !) +-
T 9
"
)" ! *9 ! 0 .3b3Qa
! >!) n =!F
?B " 2
P$
"!B
F linq to sql0 r +a
! M
a? = 2 > !
.3b3
linq to sql 0 " 1+
T +
" T + ` !` ~
Create
`
? H>
z !p 0
?B " 2
! "
"" P <
" d
?B
>
!H
?B \ f+
" d
a? > !
! =
a? = 2 0 Q _
! sql " " P <
?B ! de MyAtr =
?B G 9 ^ fS"N! 0 > ) , F
?B fO
` 0
)!t`
R `$ T `?B \ `f+
` !K` ?
H"
` T `+ ` ,B 0 " 1+`
9 ?B \ +
>!
,B R ?D
d=
!+I
R"!B < Q7 T
> !a9
N % R; R" "!F
d = T ?B
H"
u!F
,B M
! ! de 0 Q _
!K ?
+ " p,B % ] d
% "!F
?B F U
MyLinq =
"
Oa
?B M ,B
"" j C
1] >
a? = 2
>) ,F
"
C !
! !H
MyLinqDataContext@A`B
! T
M
\ f+
?
+-
0 "
T 9
0 @AB G T ) = 2
r
r ?B )"
% "
H"
,B
+ " R ? Cp r +a
> ) B 9 ,] =!F
%C _ G " T ?a R C ) B G+
H"
V + " properties 0
R; > ) , F
"!H!
?B " 2 R CS
R;
= 0 @AB M
`+
` 9 ` T `?B `
`)"
T ?B
`
! de
MyAtr
& DAp G
DataContext
@AB 0
BL
SubmitChanges();
j C
& DAp 9 ?B M ,B
"!B %
M ,B
= >
!
"
r H"
d= @
! R"!B <
""
5 ! >) B
CB"
5 ! >) B
MyAtrs
T ?B
A]
!`
!t R; & KfO
\ f+ B >!t
r! 0 B Q7
"
+ " 0 " 1+
T )"
?B QCD VaD!
+ h >) B "
=2
B Q7
, F R" ! ! 5!
9
2+
>!
"
!H + "
& ]
DATA
"
\ f+
> )!t
MyAtrs
"! H
!_
B "
S e
M
a? > ! %
"
%F "
R; =
7
F
T + !1 )!2
F =! Qd "
R; Qd "
!<
7 R 0& + "
R C9 + "
T 9
% R; > ! %D!
0 "
T ?B
> )!+
+ ) !2
"2
< G ?lC)
! % ? G+F h )!2
!< " 2 0 o )
:
T ?B
!< >
Qd " !2
!<
d !F
,C 0 T ?B
$PROCEDURE)
!2
!< 0 " 1+
? >
! r
?B ! de 7
?B " 2
fS"
R;
>) ,F
?B " 2
fS" =
V +"M
=" " g U 9 , _
M ,B 1
!*
>
a? > !
) !2
r! 0 Qa z t
!< " 2
7 "
!2
?B " 2 !2
!< R "
a? = 2 > !
Q- ! G " 2
?B " 2
"2 0
!< M
"!B %
+ " Q7
ALTER PROCEDURE dbo.StoredProcedure3
@Mname nvarchar(50),
@Mfamily nvarchar(50),
@Tel int
AS
insert into Table1 values(@Mname,@Mfamily,@Tel)
RETURN
@Mname!+
!C)
!2
< Q7 "! H
!< = %
!_ )!+
=0h
< R " T + !F
0 B >! "
"
"
FU
r! 0 B Q7 T
B "
)!+
<
> )!+
<
T
0
T
"
? T 9
!2
!< =
> ) !+
<
F
T )"
! 0 B Qa
G+
>
CommandType.StoredProcedure
!!
CommandText
!_
h
+ " "
T ?B
FU
CommandType
Parameters.Add0
r ) !2
!< 0 " 1+ R
B "
" 1+
?
cmd.Parameters.Add("@Mname", SqlDbType.NVarChar).Value =
textBox1.Text;
cmd.Parameters.Add("@Mfamily", SqlDbType.NVarChar).Value =
textBox2.Text;
cmd.Parameters.Add("@Tel", SqlDbType.Int).Value =
int.Parse(textBox3.Text);
cmd.ExecuteNonQuery();
con.Close();
}
r )" = 2
>!
!< M
!H
rT
"
!0 B
+ !0 B " T
%OH!
T f )!2
"
!_! 5! R; !H
)"
= 2 R; >
!< 0 " 1+
!
R CS
p! !2
!<
T + !F
r "!H
>! "
T) d
!2
>!
!<
>! "
SELECT
@Mname=Mname,
@Mfamily=Mfamily,
@Tel=Tel
from
[Table1]
where(Mname=@Search);
RETURN
S G !E J
ASP.NET
0 " 1+
"
%
U 9
M T 9
P$ a? T ?B v
+ T 0 "!w v
a? 0 Q _
% !+? & 1]
S T ?B
" T) d
- !p
+ !+?
I+
G %d
G %d
">
5 !
!d = % J Q7
> ) & 19 S T
hM
"!B
Q7
T) d
> IS
QKF G "
I ; >!) n Qa
h - 9 C+-
C >!
,C 0 y,+f > ) R 0
: U G R !<
! R + ) B = 2 > ! % !+?
;j<>
"
< %d "!<
jf G
!P " > ) $
+-
I; j C
I !F %d
B" d
& 1]
TO$
B & 1] - !p h
2?
"
!H R $ %
k, " d
" d!
T 9
h G
- !p T "
hG
"
9 DAp
>!P "
a? R
R"!B 0 > ! T + !F
!_
+d "
0 "
! 0 ?
& 1]
P$ ) B G T
a? = 2 > ! T
B&
"
,B
d " M 8_
)"
q <
a?
T
> B
& 1]
?B
Q] A7 N % %f
! G T+
9 1]
R C ) B !P " > ) R 0
N G !9 0
Q7 @ "; M R !9 w B "
%
Html,ajax,asp
T
% 9>)
B !
! > ) B G+
R 0
] d % C) 0
>
+_ 0 ?
" !9 w B G ?$ G
"T
!
d"
d " T )"
S VaD! "
T 0 "!<
q < "
d"
" + !F ! "
%d
r ?B " 2
"
www.yahoo.com
>0
F \ +B G
fS" =
+_
)"
%
" "! H
\ c !< M
rT
! 0 B Q7
) m9 G > ) B C) \ & 1] %d
"
- !p
"
m9 " G > ) B
fO m9 =
+ B
<body>
/////////////////////code
</body>
r Q7
?B
)O
<body>
<form id="form1" runat="server">
<div>
</div>
</form>
</body>
c !< C
+_
) O >! "
I+
+ m9 " G > ) B C)
"!B -A
?B M ,B Design>
% div
Oa
R C) B ?B
CB" a? = 2 > !
)O
Sd
F %
t C)
S d - !p
- !p
1] + "
^ )" !_
> "N r ?B
)O
CB" Qa
"!H! Design
r ! 0 B Q7
?B
)O
2+
)" ! *9
R; text
"!H!
<div>
<asp:Button ID="Button1" runat="server" Text="Test" />
</div>
- )" ! *9
! Qa
B
r ?B
Q7
) B G ! ? ??B
" ! *9
)O
"
! %C
" !+?B
5 ! >) BT) d
2+
+
"
"!B
t C)
?B ! ctrl+F5
asp:
+
)O B
) B r +a
html R 0
div
9 \ & 1] > ) B r +a
runat="server
R" " !_ r +a
T "" = 2
- !p
F T + ? R; > ! > B 0 ?) R $ +F
_ 19 ) ?B M ,B CB" >
T ?B " 1+
r )" !_ ! 0 Qa
0
B0
! !H
B G+
>!
VB % a9 M r
<div>
<asp:Button ID="Button1" runat="server" Text="Test" />
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</div>
</form>
r! 0 B Q7
" VB % a9 B +
d !H
<div>
<asp:Button ID="Button1" runat="server" Text="Test" />
<br />
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</div>
R; M ,B "
>!
fO G+
!0 B "
VB % a9 Qd " G+ B T ?B
"
9 ?B S + M ,B
d"
! 0
8_
" BG
?
?B !<
!F
r ?B " 1+ ! 0 B Q7
<asp:Button
BackColor
?B u D
)O
2+
?B !
CB" ? CU %O< m
d !H
ID="Button1"
runat="server"
Text="Test"
onclick="Button1_Click" BackColor="Blue" />
r +a
Qa M
+_
B % ? R; Q S"
Test CB"
?B
! C
BR < 9
+_
" A7
)"
=2
q < C %
QCD G
R $ + S N ?B
= 2 %D!
d"
+ !F
?B !< !9 w B =
)O
d "G
T!
d " 8_
"
VB % a9 B "!B %
>
B G " " !_
1] " C
" d "
+ !F
OF
d" C
C >!
! R + >!
CB"
! G
2+
>0 2
)"
2? "
^ "! H
T)
?B " 1+ label 0
T) ?B F U
U 9
r ?B i 9
d !H
" d G+ T +
T "!H !
& ]
a?
<div>
<asp:Button ID="Button1" runat="server" Text="Test"
onclick="Button1_Click" BackColor="Blue" />
<br />
!, 'e *
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</div>
GaC
)" ! *9
?B " 1+
R; > ) H
style
) H
] )
C) R $
QB " 9 ! *9
<div style="font-family:Tahoma;background-color:Green">
<asp:Button ID="Button1" runat="server" Text="%'H* ' *"
onclick="Button1_Click" />
<br />
!, 'e *
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</div>
)" ! *9
R;
text-align
%]d
! H !_
1]
" )
C)
d !H A7
center
<div style="font-family:Tahoma;background-color:Green;text-align:center">
<asp:Button ID="Button1" runat="server" Text="%'H* ' *"
onclick="Button1_Click" />
<br />
!, 'e *
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</div>
r ?B QCD Qa G
?B wB
"!B %
M ,B
?B " 2
1] >
fS" =
+
r
?B QCD ! 0 Qa Q7 % F B a? > !
)" !_ VaD ! !
ImageUrl
r ?B i 9 T +
R;
!H
)O
VaD ?B !
! !H
VaD +
d !H r +a
ImageUrl="~/NewFolder1/Penguins.jpg" />
"!B ) d
%
M$ B
64 ? T )
?B
!_ ] " 64 ! !
a
Width
1] 0
!H A7 T ?B
+C _ !P " !+?B !)
" 1+ % % AD 0 ?B ! *9
?a
1] 0
1] ] "
"2 \
! M
a? > ! T
?$
)v
" 0 Q_
?B
r 7 "
" 1+
!+?B G 0
/>
<div >
<hr />
</div>
G < !t
r 7
" # 9
+ >! r
<br />
: ! M 0 B & 1+ % fU G+ j C > ! r
<h1>
<div >
<hr />
<h1>Computer</h1>
<h2>Computer</h2>
<h3>Computer</h3>
<h4>Computer</h4>
<h5>Computer</h5>
<h6>Computer</h6>
</div>
r 7 G+ > H
<ol>
<li>computer</li>
<li>book</li>
<li>door</li>
C > ! r <ol>
</ol>
G+ 0
<P>This
paragraph
contains
single
<SPAN
STYLE="color:
+C _ m ! *9 > !
blue">blue</SPAN>
word
Table :
B& ]G
" ] d T
?
) R + ! Qa
!+?B!)
m9
] d T
) d >! H , T)
B %C _ "
?B " 2
) !+?B Qd 9 0
c !< M
0 " 1+
>
d !) "
a? = 2 > ! % O ) d
<div>
<table>
</table>
</div>
</form>
M !t M
M !0 B "
r"
<table border="2">
<tr>
<td>
</td>
</tr>
</table>
7 > ! T ?B
y! 9
!_ . ! !
)R +
) !t
>!
</div>
T ?B
FU
R +
!0 B "
7 > ! "! H
!_ !t m9 Qd "
> ) R + r +a
r
<table border="2">
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</table>
r% R +
> " B T ?B
FU
!P " !t M
<table border="2">
<tr>
<td></td>
<td></td>
<td></td>
</tr>
<tr>
<td></td>
<td></td>
<td></td>
</tr>
</table>
rT )"
!_ 44 ! !
R;
width
"! H ! "
1] u!D QB
a? > !
"
< =
) Q S % a9
)" !_ = "
r ?B F U "
>)R + >
Va9 =
! Q S " VB % a9 "
R + >
! CB" M
)" ! *9
>
Qa
] d T
) !+?B
"
I ; width % !+I
) d B
t C)
" dxd 0
?B
)O
2+
?B !
1]
r )" ! *9 ! 0
<table border="2" width="100%">
<tr>
<td style="width:20%" >
<asp:Label ID="Label1" runat="server" Text="UserNmae"></asp:Label>
</td>
<td style="width:50%">
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</td>
<td style="width:30%">4 !3 #
%'H* ' *</td>
</tr>
<tr>
<td style="width:30%" >
<asp:Label ID="Label2" runat="server" Text="Password"></asp:Label>
</td>
<td style="width:50%">
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
</td>
<td style="width:30%">
<asp:Button ID="Button1" runat="server" Text="#
" />
</td>
</tr>
</table>
r ?B o-
)" C = 2
,CD ) B "!B
border="2"
) d
)O
" O "" j C
?B M ,B "
%
CB" >
O +
> ) S +
?B !
d !H
R; > ! > B ) R $
S Validation
CB" +_ & ] G ! ~ " ?B "
L
?B QCD L
" + !F
%_ T)
"G
9
p!
" + !F
>! B =
C+- ! B
" "! P = 2
+_ R $ %
d B A] G
q <
?B
!+?B
?B "
" d
dh
0
7 " !H
! B
5! G
) VB % a9
! 0 Qa
? T ?B
" Validation0
?B !< " d
T)
"
>" f
RequiredFieldValidator
+ 1tS A7
"
B % ) 5! 0 " 1+
> $ T ) f a? 0 Q _ G ! ? T ! H
M TextBox1
,CD )
ErrorMessage
"
<
& ]G
>!+O R 0 T) B )"
BG "
7 "L
"
5! G
) d
T ?B !+?B
" d"
\ K+
fS" +
) G
!+?B " h
!+?B
kK+? "TextBox2
<asp:RequiredFieldValidator ID="RequiredFieldValidator1"
runat="server"
ControlToValidate="TextBox1" ErrorMessage="
"></asp:RequiredFieldValidator>
</td>
<td style="width:30%">4 !3 #
%'H* ' *</td>
</tr>
<tr>
<td style="width:30%" >
<asp:Label ID="Label2" runat="server" Text="Password"></asp:Label>
</td>
<td style="width:50%">
<asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
<asp:RequiredFieldValidator ID="RequiredFieldValidator2"
runat="server"
ControlToValidate="TextBox2" ErrorMessage="
"></asp:RequiredFieldValidator>
</td>
<td style="width:30%">
<asp:Button ID="Button1" runat="server" Text="#
</td>
</tr>
" />
</table>
"
) VB % a9 "
> +
T)
?B M ,B "
CB" >
?B !
?B
)O
!
2+
?B
3// 0 !+H
"
" D A7
?B M$
Sd !
AD
d !H
r & 1] R"!B F U
Web Form M Add new Item %C _ 0 % F B
)" !_ VB % a9 M
fS" =
1] >
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</div>
</form>
</body>
</html>
? R; > !
!0 B
?B M ,B
""
CB" >
1] "
"%
!_ B
)" !_ >
set as start
1] G S R ?D
?B %
M ,B
1]
1] >
?B !
! % FB
! a? 0 Q _
a? > ! "
?B \ f+
% ) BG
?B M ,B "
CB" >
?B !<
VB % a9 ! "
?B !
R; page
% !P " & 1]
1]
!0 B
7 >!
?B " 1+
<div>
<a href="Default2.aspx">GO TO PAGE</a>
</div>
% )
% ) >!
fO
?B
)"
R; S!+?B "
?B
"
! %C
"
Session
> I B % a9
R $"
T) d
!0 B"
" 1+
y! 9 ,
G 0 L
Session
! *+ M C
%OH!
+_ r +a
! 0
+_ !P " + !F
+ > ! r +a
7 " A7
"
C < %OH! 8_
CB" "
! de
1] "
1]
!"
= R;
?B !Be R; > ! = M
+ !1
Session
>
1] " -
) f
+_
+ " Session
<body>
<form id="form1" runat="server">
<div>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
<br />
<asp:Button ID="Button1" runat="server" onclick="Button1_Click" Text="ts" />
</div>
</form>
</body>
r ?B
)O
Session
? R; > !
!0 B
1] CB" > ! ! 0 B Q7
+ !1 >! "
= "
1]
d !F = P?)
d !H
{
Session.Add("mas", TextBox2.Text + TextBox1.Text);
Response.Redirect("Default2.aspx?num1=" + TextBox1.Text + "&num2=" +
TextBox2.Text);
}
>!r
= "
1] B
- "! P
!_ num2 "
1] >
& ]G "
! Q S "R +
?B
)O
?B o)" !_
1] >
! CheckBoxList M
2+
QueryString
CB" M
?B !
!
9
?B " 2
r +a
c !< M
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" Text="Button" />
<br />
<asp:CheckBoxList ID="CheckBoxList1" runat="server">
</asp:CheckBoxList>
</div>
</form>
</body>
>) B"
"
9M
!0 B
%
?B
CheckBoxList1
d !F
CB" M ,B "
fS" "
CheckBox
a? = 2 > !
R"!B F U
! G 0 o )
T) d I;
? R;
ListItem g;
for (int i = 100; i <= 150; i++)
{
g = new ListItem();
g.Text = "8 c " + i;
g.Value = i.ToString();
CheckBoxList1.Items.Add(g);
}
}
"
?B " 2
R $N T ?B F U
?B !
@AB 0
ListItem
CheckBoxList1
-^T
M % FB
> IC+ ;
+ "
T ?B )"
!+ " T 9
R"!B F U > !
CheckBoxList1
R;
Value Text
CheckBoxList1!]
?D
value 0 " 1+
r ?B
fS" "
RepeatColumns
"" j C R +
"
"" j C R +
!!
?$ " )
^CheckBox
)O
2+
d !H
CheckBox
RepeatColumns
!H A7
?B T ?9
"
B
r
) VB M$ ! B T ) d
?
?B F U
RadioButtonList1.Items.Add(g);
}
}
}
=2
BG
r
; a? !
? "
? source %C _ "
?B \ f+ VB M$ ?$
"" j C C
*<
! 0 B a? = 2 > !
CB" >
?B " 1+
?B !
! M ,B
) i !a
) f !H
0
"! H
<head runat="server">
<title>Untitled Page</title>
<script type="text/jscript" language="javascript">
function aa()
{
if(!confirm(' 7 'H
\ +g
c
Z # '))
{
return false;
}
}
</script>
</head>
?B !
)" !_ i !a
8 9=
!!
OnClientClick
CB" "
"N"
ok CB" >
+
"
OnClientClick
"
! ! B !H "
" " %OH! false
"
' T )"
+ a 0 A_ B % & ] G
d !F i !a
!H
^"
0 T)0
onclick
"" j C
OnClientClick
)"
C " + !F
%OH! true
! %C
* < " I ; % a9
1+ i !a
RadioButton
"
T ?B
% a9
" ^ client %C
M aa 8 9 "!B M ,B
& DAp
RadioButton!)
BL
? N"
>
! M ,B
P$ S
y! 9
C !
onclick
d !H
?B " 1+ i !a
CD ! *+ M
a? > !
RadioButtonList1_SelectedIndexChanged
rT ?B
d !FRadioButtonList1 >
! M ,B
"
%C _ "
R;
"
" m? !+ kS _ "
rT ?B
i !a
" 1+ R; 0 source
T ?B QCD Qa G
</div>
<%=str %>
</form>
)" ! *9 true
r"
! %C
" I;
5 ! > ) B I; >
! M ,B
!)
! >! 0 Q _
9"
vD
BG
AutoPostBack="True">
</asp:RadioButtonList>
r ?B
)O
2+
?B !
S MasterPage
!H A7
?B " 1+
%
0
"2 \
"
MasterPage 0
%C
" ? M
1] !) "
! M !+O
1] >h
?a " 1+
?B F U
) MasterPage 0 !H
? ; >!
) = 2 =!F !) > !
!
?B " 1+
d !H
+
) MasterPage
% J > ) %C _ - !p Q- !
?B
" & 1] C) ) %
R;
& 1]
+C _ MasterPage " %
" B +C _ ? "
?B - !p
H !) MasterPage
- !p MasterPage " B
" 1+
"! H
I !F
- !p > ! B
!_ R; "
"
1] " !H
B !+
1] 0
ContentPlaceHolder
1] !) > ) !+?B
?+
+C _
"
<asp:ContentPlaceHolder id="ContentPlaceHolder1"
runat="server">
</asp:ContentPlaceHolder>
</div>
</form>
</body>
</html>
!_
ContentPlaceHolder
"
%C _ M "
" 2 ..
!H G ! ?
%C _ R; T )"
! %C _ G C) " 7 > !
0 T ?B o- tr "
)td0
T ?B QK+ T)
h R +
" a? > ! r +a
r ?B " 1+
colspan="2"
0 "
> ) !+?B
1] !) 9
)" !_
R +
= " !t Qd "
ContentPlaceHolder
)" !_ %C _ G "
<table border="1" width="100%">
<tr>
<td colspan="2"></td>
</tr>
<tr>
" d
> ) %C _ "
"! H !_
1] !) " 9 T )"
!_ VaD M
!t
T"" g U 9 , _
<table border="1" width="100%">
<tr>
<td colspan="2">
T
? H
1] G
1] M R"!B F U 8_
master page
% F B master page
T
1] - !p a? 0
?B F U
!) !+?B
?B
N )" !_
"
1] "
> ) !+?B
1] !)
?B o-
,_
1] R + > !
ContentPlaceHolder
1] CB" > !
!0 B
)" !_ VB % a9 M = "
1] "
%C _ "
& 1+
CB" M
1]
1] "
)O
2+
?B !
1]
?B
r )" ! *9
center
0 %C _ R;
1]
text-align
<tr>
colspan="2" style="text-align:center">
<asp:Image ID="Image1" runat="server"
ImageUrl="~/NewFolder1/Persia 176.jpg" />
<td
</td>
y,+f > ) jf
% ) ) ? G 0 o ) T 0 "!<
Navigation " T ?B
& ]G
" 1+
= "R +
) Navigation 0
B L TreeView Menu Q7 T ?B
T ?B
" 1+
FU
= " !t > ?
a? > ! %
- !p
R C+ ^& 1]N
!+?B G ?$
+ " B%
"
url
"
"
B
" 1+
1]
= %J
R ?D
!P " & 1]
1] A7 T )"
& 1]
,]
" 9
1] =
U 9
title
SiteMapDataSource M
T)
!_
fO
d " %d " M
rT )"
r "!B 0
!_ R C !
web.config
? M
1] "
1]
<system.web> </system.web>
!0 B
<siteMap>
<providers>
<add name="MYU" type="System.Web.XmlSiteMapProvider"
siteMapFile="Web.sitemap"></add>
</providers>
</siteMap>
</system.web>
M
r T ?B
B " " 0
B G
FU
SiteMapDataSource
SiteMapProvider
>!
%C _ "
SiteMapDataSource
! 0 B G ! ? T "!B F U B % " 0
Web.sitemap
T )"
!_
SiteMapDataSource1
!!
%d "
? > ) !+?B
DataSourceID
rT ?B
DataSourceID="SiteMapDataSource1">
</asp:Menu>
<br />
<asp:TreeView ID="TreeView1" runat="server"
DataSourceID="SiteMapDataSource1" >
</asp:TreeView>
Qa
R; Auto Format
?B M ,B % AD >
%d "
?
r ?B T ?9
0 >!
fS"
r ?B
r ?B " 1+ R;0
>!
?B F!
rT )"
1] >
! R; R" " !_
Web.sitemap "
! *9 ! 0 Qa
+-
R; % F B
B T ?B
)O
"!B F U
FU
2+
?B !
SiteMapPath !+?B 0
>
1] !)
computer =
G 0
1] M
"
</siteMapNode>
</siteMap>
!P "
<siteMapNode></siteMapNode>
?B
M % !+I
9 +a G
)" !_ !P " d
"
& 1] +
& 1]
d !H
?B y ! 9
"! H !_ , _ d
Qd "
<siteMapNode
url="a.aspx" title="
<siteMapNode url="b.aspx" title="
" description="">
" description="" />
</siteMapNode>
</siteMapNode>
</siteMap>
S FileUpload
" 1+
!_
FileUpload0
1] >
?B ! de
! FileUpload !+?B 0
"
?B " 2 \
?B %F "
! M
, F ! B o!p 0
!+?B G
? ; >!
d !H
?B
r )"
<div>
soluotion %C _ "
fS" =
<M
)" !_
1] >
VB % S M
^ I, F ! de > ! N
CB" M
?B " 2 Explorer
<div>
<asp:FileUpload ID="FileUpload1" runat="server" />
<br />
<asp:Button ID="Button1" runat="server" Text="Save" />
<br />
<asp:ListBox ID="ListBox1" runat="server"></asp:ListBox>
</div>
! B
\ f+ Q F & KfO
T ?B ! de
s
Q F
T) d
^% !F Q F 0
? ! de CB" > !
!0 B
Q7 N T )" j C VB % S "
! B0
! "
> I, F
" VaD C Q F !H
!_
1] >
!~
! asp : 0 image
,B
0 !+a$ B I, F 0
html : 0
img
A7
0 o )
?B "
!+?B M % !+I
) f
) j C
r^ ?B F U N )" ! *9 ! 0
+
B
d
)"
<br />
<img alt="" id="mas" runat="server" src="" />
)O
2+
Save CB"
?B \ f+ VaD M Browse %C _ 0
! ~ " "!B \ f+
! de
Q FM ! B ?
"!H!
< " B
true
! "
?B !
?B
VaD
FileUpload1.HasFile
"!H
!H r +a
& ]G
false
AJAX
% & ]G
C
& +
BL
QB !P "
%D! j F vD G
?B " 1+ ajax 0 !H
"0
B"
" + !F
\
+ !F
!
+_
d" C
C " + !F
% SM
CB" M
?B " 2 \ % 9
r ?B !
! M S
G " >!
? CB" > !
!0 B
) d C %
)" !_
1] >
! VB
?B P
1] G <
!H S G
"
ajax
"
B G T) d
UpdatePanel
" ?B R
!<
: ! VB % S 9
) d B=2 R < 9
Progress Bar M R
!<
ScriptManager
^Qa z t N )" !_
?B M ,B CB" >
!+?B M
a? > !
UpdatePanel
Qd " "
I ; & 19 )
, _ > ) !+?B
9T
)" !_
!
+
BG
=2
1]
</ContentTemplate>
</asp:UpdatePanel>
</div>
5 ! & + "
j F vD G
F BG
"
?B
C " + !F
)O
2 + 9 ?B M ,B CB" >
?B !
" + !F
VB % S !+?B
"
SQLD
9T) d
%C _ G
!+?B G %
j F vD
sql Qd "
Qd "
" T "!B v
I; 5 9
ObjectDataSource0
BG
B ?B
" C R
"" P <
T ?B
+ " T ?B
" 1+
! de
fS" =
5 9 >!
PROCEDURE0
+_ R $ "
%D!
D'
, _ > ) jf "
>!P " L
) PROCEDURE0 " 1+
sql R 0 &
R; =
" 1+ R;
T ?B
R C ! %?
Q +? server
B !H G ! ? T ?B
d !F
r
"" P < M 1 :
; $
%C _ 0
?B " 2
?B " 2
! M
?B " 2
?B " 2
fS" ! 0 Qa z t
R; > ) , F
?B " 2
?B " 2
fS" =
=0h > ) !2
!<
7 > )!2
(uId = @UId)
RETURN
nvarchar(50),
@uLogonName
@uPassword
nvarchar(50),
nvarchar(50),
@IsActive int
AS
INSERT INTO tUsers
(uName, uFamily, uLogonName,
uPassword, IsActive)
!< % S
VALUES
(@uName,@uFamily,@uLogonName,@uPassword,@IsActive)
RETURN
AS
SELECT
FROM
tUsers
RETURN
nvarchar(50),
@uLogonName
nvarchar(50),
@IsActive int
AS
UPDATE
tUsers
SET
uName = @uName, uFamily = @uFamily,
uLogonName = @uLogonName, IsActive = @IsActive
WHERE
(uId = @uId)
RETURN
AS
SELECT
FROM
tUsers
RETURN
?B " 2
I?
C T ?9 ! 0 Qa z t
6 & ]
S % ! 0 !
<div dir="rtl">
<table
border="1">
<tr>
<td width="10%" >
:! B =
</td>
<td >
1]
"!H!
& C ?9 G > ) B
H"
d =
</td>
<td>
<asp:TextBox ID="TextBox2" runat="server"
Width="279px"></asp:TextBox>
<asp:RequiredFieldValidator
ValidationGroup="ASRDA" ID="RequiredFieldValidator2"
runat="server" ErrorMessage="*"
ControlToValidate="TextBox2"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td >
:>! B C,B
</td>
<td>
D C,B
</td>
<td>
<asp:TextBox ID="TextBox4" runat="server"
Width="279px"></asp:TextBox>
<asp:RequiredFieldValidator
ValidationGroup="ASRDA" ID="RequiredFieldValidator4"
runat="server" ErrorMessage="*"
ControlToValidate="TextBox4"></asp:RequiredFieldValidator>
</td>
</tr>
<tr>
<td >
:
</td>
<td>
D C,B
ErrorMessage=" C,B
ID="CompareValidator1" runat="server"
C 9"></asp:CompareValidator>
</td>
</tr>
<tr>
<td >
:! B % U
</td>
<td>
<asp:RadioButtonList ID="RadioButtonList1"
runat="server" RepeatDirection="Horizontal">
Value="1">
<asp:ListItem Selected="True"
F</asp:ListItem>
<asp:ListItem Value="0">! ~
F</asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
<tr>
<td colspan="2">
<asp:Button ID="Button1"
ValidationGroup="ASRDA" runat="server" Text="% J"
Width="180px" />
</td>
</tr>
</table>
</div>
)" !_
r ; " k ? Qa
1] >
!H Qa 9 )" ! *9 ! 0 Qa
!H M
R; > ) B
<asp:TemplateField HeaderText="
SortExpression="uName">
<ItemTemplate>
<asp:Label ID="lbluName"
runat="server" Text='<%#Eval("uName")%>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtName"
runat="server" Text='<%#Bind("uName")%>'></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField HeaderText="
"> H"
<ItemTemplate>
<asp:Label ID="lbluFamily"
runat="server" Text='<%#Eval("uFamily")%>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox ID="txtFamily"
runat="server" Text='<%#Bind("uFamily")%>'></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
=
<asp:TemplateField HeaderText="
">>! B
<ItemTemplate>
<asp:Label
ID="lbluLogonName" runat="server"
Text='<%#Eval("uLogonName")%>'></asp:Label>
</ItemTemplate>
<EditItemTemplate>
<asp:TextBox
ID="txtLogonName" runat="server"
Text='<%#Bind("uLogonName")%>'></asp:TextBox>
</EditItemTemplate>
</asp:TemplateField>
<asp:TemplateField
">% U HeaderText="
<ItemTemplate>
<asp:Label ID="lbluIsActive"
runat="server"
Text='<%#GetStatusTitle(Eval("IsActive").ToString())%>'></asp:La
bel>
</ItemTemplate>
<EditItemTemplate>
<asp:RadioButtonList
ID="RadioButtonList2" SelectedValue='<%#Bind("IsActive")%>'
runat="server"
RepeatDirection="Horizontal">
<asp:ListItem
</asp:ListItem> FValue="1">
</asp:ListItem>
<asp:ListItem
F ! ~Value="0">
</asp:RadioButtonList>
</EditItemTemplate>
</asp:TemplateField>
<asp:CommandField
ShowEditButton="True" />
<asp:CommandField
ShowDeleteButton="True" />
</Columns>
<FooterStyle BackColor="White"
ForeColor="#000066" />
<PagerStyle BackColor="White"
ForeColor="#000066" HorizontalAlign="Left" />
<SelectedRowStyle BackColor="#669999"
Font-Bold="True" ForeColor="White" />
<HeaderStyle BackColor="#006699" FontBold="True" ForeColor="White" />
</asp:GridView>
?B " 2 0
:! <
@AB M
? R; R "
using System;
using System.Data;
using System.Configuration;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using System.Data.SqlClient;
public UsersProvider()
{
!0>) B
MConnection.ConnectionString = "Data
Source=.\\SQLEXPRESS;AttachDbFilename=" + @"C:\Documents and
Settings\Administrator\Desktop\LoginTest(control in
grid)\Login.mdf" + ";Integrated Security=True;Connect
Timeout=30;User Instance=True";
MConnection.Open();
MCommand.Connection = MConnection;
MCommand.CommandType = CommandType.StoredProcedure;
MCommand.CommandText = CommnadText;
}
private void CloseConnection()
{
MConnection.Close();
}
public void UsersInsert(string uName, string uFamily, string
uLogonName, string uPassword, int IsActive)
{
OpenConnection("UsersInsert");
MCommand.Parameters.Add("@uName",
SqlDbType.NVarChar).Value = uName;
MCommand.Parameters.Add("@uFamily",
SqlDbType.NVarChar).Value = uFamily;
MCommand.Parameters.Add("@uLogonName",
SqlDbType.NVarChar).Value = uLogonName;
MCommand.Parameters.Add("@uPassword",
SqlDbType.NVarChar).Value = uPassword;
MCommand.Parameters.Add("@IsActive",
SqlDbType.Int).Value = IsActive;
MCommand.ExecuteNonQuery();
CloseConnection();
}
public void UsersUpdate(long uId, string uName, string
uFamily, string uLogonName, string uPassword, int IsActive)
{
OpenConnection("UsersUpdate");
MCommand.Parameters.Add("@uId", SqlDbType.BigInt).Value
= uId;
MCommand.Parameters.Add("@uName",
SqlDbType.NVarChar).Value = uName;
MCommand.Parameters.Add("@uFamily",
SqlDbType.NVarChar).Value = uFamily;
MCommand.Parameters.Add("@uLogonName",
SqlDbType.NVarChar).Value = uLogonName;
MCommand.Parameters.Add("@IsActive",
SqlDbType.Int).Value = IsActive;
MCommand.ExecuteNonQuery();
CloseConnection();
}
public void UsersDelete(long uId)
{
OpenConnection("UsersDelete");
MCommand.Parameters.Add("@uId", SqlDbType.BigInt).Value
= uId;
MCommand.ExecuteNonQuery();
CloseConnection();
}
public DataTable UsersSelect()
{
OpenConnection("UsersSelect");
MAdapter.SelectCommand = MCommand;
MAdapter.Fill(MDatatable);
CloseConnection();
return MDatatable;
}
"
r )" ! *9 ! 0 !
! ; > ) B )" !_
1] >
! 3)
/% %1 *
</DeleteParameters>
<UpdateParameters>
<asp:Parameter Name="uId"
Type="Int64" />
<asp:Parameter Name="uName"
Type="String" />
<asp:Parameter Name="uFamily"
Type="String" />
<asp:Parameter Name="uLogonName"
Type="String" />
<asp:Parameter Name="uPassword"
Type="String" />
<asp:Parameter Name="IsActive"
Type="Int32" />
</UpdateParameters>
<InsertParameters>
<asp:Parameter Name="uName"
Type="String" />
<asp:Parameter Name="uFamily"
Type="String" />
<asp:Parameter Name="uLogonName"
Type="String" />
<asp:Parameter Name="uPassword"
Type="String" />
<asp:Parameter Name="IsActive"
Type="Int32" />
</InsertParameters>
</asp:ObjectDataSource>
8 9M
% J CB" > ) B
!d; %C _ "
ObjectDataSource1.InsertParameters["uName"].DefaultValue
= TextBox1.Text;
ObjectDataSource1.InsertParameters["uFamily"].DefaultValue =
TextBox2.Text;
ObjectDataSource1.InsertParameters["uLogonName"].DefaultValue =
TextBox3.Text;
ObjectDataSource1.InsertParameters["uPassword"].DefaultValue =
TextBox4.Text;
ObjectDataSource1.InsertParameters["IsActive"].DefaultValue =
RadioButtonList1.SelectedValue;
ObjectDataSource1.Insert();
}
public string GetStatusTitle(string StatusId)
{
");
F" : "
F !~
! 0
! &S
?B !
) =2
& -A]
?B M ,B ;!
>
>!
Cookies
0
C
`?
! de ^! BN%? AB %C
+_
" 1+
%
"
" 1+
B B >0
" ) B B B & 19 G
) B BG %
`9 `?B ` !` de C` !9 w B "
G` " ` ) d `
+ )%
R; @ ";
9 DAp %
G R! B 0 C
"!B
R;
`) B B internet options %C _ 0
" !` G 0
R;
"!B
9
?B
! %
sD +
`?B o`-
B B G A7
B B
Session
B B 0 ?B ! de C !9 w B "
M9 9
S %
!
R;
R;
! B +S
?B G 9 s q 9 ) B B > !
%_ !)
" +_ A7 "
! %
F -
?B
" + !F
B
F"
=2 > B $%
9
C " d +-
" > `P
> `P
> ! )" ! *9
"
C & DAp
? T+
PS Q7
? %
fS"
) B B % ? T?B
"!B 0
9 `DAp T ) `d
1] " CB" M
? = "
R; > ) B B > 9
B CI +a
! B R $ ?B ! de B B
1`] " VB % a9 M
="!H
R;
R;
IC+
PS 0
?B " 2 \
1] load
! M r
1] CB" > !
; ! B %C 0 B
d " !P "
9
7
!0>) B
" T?B ! de
= "
?B QCD Qa G
^"
<
_" 4 0
A7 N B B R
< R 0 G 9 >!
j `C
9 `DAp `) B "!B ) d
)O
?B !
%
_HCK.Expires = DateTime.Now;
!
+F G 0
)" !_
-R 0
B BR 0
B B s R 0R $"
C ""
S\
MSDNb
Apress.LINQ.for.Visual.C.Sharp.2008.Jun.2008b.
Microsoft Sql Server 2005 Programming For Dummies Apr 2007b3
Professional C# 2008 (Wrox - Mar 2008b
b6
Prentice.Hall.Core.Internet.Application.Development.with.ASP.NET.2.0.Feb
.2007
Wrox.Professional.ASP.NET3.5 2008b#