????? ????? ASP.????? ??? NET
|
?????? ??? ?????? ??????? ???? ?????? ???? ????? ??????
???? ??? ????? ??????? ?????? ????? ?????? ?????? ?? ASP.NET
???????.
????? ??????? ?????? ?? ASP.NET ???? ??
???? ?????? ?? ???? ??????? ??? ?????? ???? ????? ?
????? ???????.
???????
?????
???? ??????? ??????? ?? ??????? ?????? ??? ???????? ???????
?????? ????????? ???? ??????? ???? ???????:Microsoft Visual Studio.NET????? ??????? ?????? ? Microsoft (IIS)
5.0????
????? ??????? ??? ????? ?? ???????? ???????: ??????? ???Microsoft ASP.NET
???? ????
????? ????? ASP ??????? ????? ????
??? ???????? Response.Write ???? ????????? ???????? ????? ??? ????????? ?
?????? ???????. ??? ???? ?? ????? ?????? ??????? ??? ???
??????? ????? ??? ???? ???????? ????? ??????????.
????? ASP.???? NET
????? ???? ????? ???????? ????? ???. ????? ??????? ?????? ??????
????? ??????? ????? ?? ?????? ?????? ???????? ?????? Response.Write . ??? ????? ?? ???? ????? ???????? ??????? ?????? ?? ????? ??
?????? ??? ??? ?????.
????? ????? ???? ???
????? ?????? ??????? ??? ????? ?????? ?? ????? ????????
?????? ?????? ?????? ?????? ??????. ????? ???? ?????? ?? ????
???? ??????? ??? ?????? ???? ?????????? ??? ????? ????? ???????.
????? ???? ASP.NET ??????? ?????? ???? ?????? ?????? ???????
???? ??????? ?????? ASP ????.????? ??? NET
???? ???? ?????? ?????? ??? ????? ???? ??????? ???
??????. ??? ????? ???? ???? ?????? ????? ? ???? ??? ????? ????? ????
?? ASP.???? ????:
- ??? ????? Microsoft Visual Studio.NET.????? ???? ASP Visual Basic.????? ????? ??? NET.
????? ???????????????????.?? WebForm1.aspx? ?? ???????? ??? ????? ??? HTML.???? ?? ???? ???????? ???????? ??????? ??? ????? ?
????? ?????? FORM.
?????? ??? ??? ???? ???????? ????????? ???? ?????????? ???????? ? HTML. ?????? ????? ???? ?????? ? HTML ??? ????? ???????.
??? ????? ????????? ????????? ?????? ?????? ????? ?????
?? ?????. ??? ????? ??? ?? ?????? ???? ???????? ???????? ???????
????? ????? ??????? ??? ??????.
<TABLE cellSpacing="1" cellPadding="1">
<TR><TD>
<asp:Label runat="server">First Number:</asp:Label>
</TD>
<TD>
<asp:TextBox runat="server"></asp:TextBox>
</TD></TR>
<TR><TD>
<asp:Label runat="server">Second Number:</asp:Label>
</TD>
<TD>
<asp:TextBox runat="server"></asp:TextBox>
</TD></TR>
<TR><TD>
<asp:Label runat="server">Sum:</asp:Label>
</TD>
<TD>
<asp:TextBox runat="server"></asp:TextBox>
</TD></TR>
<TR><TD>
<asp:Button runat="server" Text="Add Numbers"></asp:Button>
</TD>
<TD>
</TD></TR>
</TABLE>
???? ??? ????? ???? ?? ??????? ??????
??????? ?????? ?????? "??????? ??????" ??????? ??? ????? ??? ???????.???? ????? ??????? ??? ????? ????? ???? ????????? ????????
?????? ????? ??? ????? Click ??? ?????.????? ???????? ???????? ??????? ??? ????? ???????.
Dim intTotal as integer
Dim intFirstNumber as integer
Dim intSecondNumber as integer
' Get the values from the input boxes.
intFirstNumber = CInt(txtFirstNumber.Text)
intSecondNumber = CInt(txtSecondNumber.Text)
' Get the total and display it.
intTotal = intFirstNumber + intSecondNumber
txtSum.Text = CStr(intTotal)
??? ????? ?????? ?? ????????? ???????? ?? ????? Button1_Click .
intTotal = intFirstNumber + intSecondNumber
???? F9 ?????? ???? ???? ??? ??? ????.
???? ????
???? ???? ??? ????? ?? ???????? ????????.??? ?????. ????? ?????? ???????. ?????? ????? ???? ?????? ????? ??? ????? ??????? ???????.
WebForm1
???? ??? ??????. ????? ???? ??????? ????? ????? ???? ???? ??
???????.???? ????? ?? ?? ?? ????? ?????? ??????? ????? ???????? ?
?? ???? ??? ????? ???.
?????? Visual Studio.NET
???? ???? ??????? ????????? (IDE) ?? ?????? ????? ????????? ????????
??? ?????? ??? ???? ???????. ????? ??????? ?????? ?????? ????
??????? ????????? ?????? ??? ??????? ??????. ????? ????? ???? ??
?????? ?? ??????? ????? ??? ????????? ?? ???????. ??? ?????
???? ?????? ????? ???????.??? ????? ??????? ???????? ???? ????????? ??????? ????? ???????.
WebForm1 ???? ??? ?????? ????? ??????? ?? ??????? ??????
????.???? ?????? ??? ??????? ??? ?????? Visual Studio.NET
IDE.??? ????? ??????? ???????? ???? ??? ?? ?????? ????? ????
???? ?????? ?????? ???? ???? ?????? ?? ???????.
???? ?? ??? ????
??? ????? ??? ????? ???? Visual Studio
.???? NET IDE ?? ?????? ?????? ????????? ???????? ??? ??????? ??? ?????? ???
??? ????? ???? ????.
????? ???? ????? ?????? ??? ASP.????? NET
???? ??????? ?????? ?????? ????? ??? ??????
???? ??????? ?????. ???? ???? ????? ???? ????? ?????? ??? ?????? ??????? ??? ?? ???? ????? ??????
??? ?????????. ??? ?????? ???? ?????? ?????? ??????? ?
??????? ???????:
- ?? WebForm1.aspx? ?? ???????? ??? ????? ??? HTML. ??? ?? ???
??? ???? ????? ?????? ?????? ?? ???? ???? ????????? ????????.
Trace=True
???? ??? ?????? WebForm1.aspx? ?? ???? ?????? ????????? ????????.?? ????? Button1_Click ? ?????? ?????? ?????? ???? ???????
????????? ??? ??? ???? ?????? ?? ???????.
??? ???? ???????
??????? ????? ????? ??? ???.
Trace.Write("Button1_Click", "Entering the Add routine")
Dim intTotal as integer
Dim intFirstNumber as integer
Dim intSecondNumber as integer
' Get values from the input boxes.
intFirstNumber = CInt(txtFirstNumber.Text)
intSecondNumber = CInt(txtSecondNumber.Text)
Trace.Write("Button1_Click", "Amount to add:" & _
CStr(intFirstNumber) & " and " & CStr(intSecondNumber))
' Get the total and display it.
intTotal = intFirstNumber + intSecondNumber
Trace.Write("Button1_Click", "Total:" & CStr(intTotal))
txtSum.Text = CStr(intTotal)
Trace.Write("Button1_Click", "Leaving the Add routine")
???? ??? ???.??? ????? ??????? ???????? ???? ?????? ????? ?????? ?????? ???????.
WebForm1
???? ??? ??????. ???? ??????? ?????? ???????? ???
???? ??????? ???? ?????????? ????? ?????
????? ?????? ??? ?????? ???? ????? ???????? ?? ????? ?? ???? ???
?????.????? ??????? ?? ????? ?????? ??????? ????? ???????? ???? ???
???? ??? ????? ???.
???? ??????? ?? ???????
???? ???????. ????? ????? ?????? ?????? ?? ????? Button1_Click ?? ??????? ??????????.
???? ?? ??? ????
?? ????? ?????? ????? ??????? ?? ??????? ?????? ???
??? ??? ??????. ??? ??? ?????? ??? ????? ??? ???
???? ????? ?????? ?????? ?? ????? Button1_Click ?? ??????? ?????? ????.
????? ????? ???
&lt;!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;WebForm1&lt;/title&gt;
&lt;meta name="GENERATOR" content="Microsoft Visual Studio.NET 7.0"&gt;
&lt;meta name="CODE_LANGUAGE" content="Visual Basic 7.0"&gt;
&lt;meta name="vs_defaultClientScript" content="JavaScript"&gt;
&lt;meta name="vs_targetSchema" content="http://http://www.zjjv.com///intellisense/ie5"&gt;
&lt;/head&gt;
&lt;Script language="vb" runat="server" id="script1"&gt;
Sub Button1_Click(Sender as object, e as EventArgs)
Trace.Write("Button1_Click", "Entering the Add routine")
Dim intTotal as integer
Dim intFirstNumber as integer
Dim intSecondNumber as integer
' Get the values from the input boxes.
intFirstNumber = CInt(txtFirstNumber.value)
intSecondNumber = CInt(txtSecondNumber.value)
Trace.Write("Button_Click", "Amount to add:" &amp; CStr(intFirstNumber) &amp; " and " &amp; CStr(intSecondNumber))
' Get the total and display it.
intTotal = intFirstNumber + intSecondNumber
Trace.Write("Button1_Click", "Total:" &amp; CStr(intTotal))
txtTotal.value = CStr(intTotal)
Trace.Write("Button1_Click", "Leaving the Add routine")
End Sub
&lt;/Script&gt;
&lt;body MS_POSITIONING="GridLayout"&gt;
&lt;form id="Form1" method="post" runat="server"&gt;
&lt;asp:Label id="lblFirstNumber" runat=server Width=125&gt;
First Number:
&lt;/asp:Label&gt;
&lt;input id=txtFirstNumber type=text size=5 maxlength=3
runat=server NAME="txtFirstNumber"/&gt;
&lt;br&gt;
&lt;asp:Label id="lblSecondNumber" runat=server Width=125&gt;
Second Number:
&lt;/asp:Label&gt;
&lt;input id=txtSecondNumber type=text size=5 maxlength=3
runat=server NAME="txtSecondNumber"/&gt;
&lt;br&gt;
&lt;asp:Label id="lblTotal" runat=server Width=125&gt;
Total:
&lt;/asp:Label&gt;
&lt;input id="txtTotal" type=text size=5 maxlength=5
runat=server NAME="txtTotal" readonly/&gt;
&lt;br&gt;&lt;br&gt;
&lt;input type=submit id=Button1 value="Add Numbers" onserverclick="Button1_Click"
runat=server NAME="Button1"/&gt;
&lt;/form&gt;
&lt;/body&gt;
&lt;/html&gt;
"?><%@ Page Language="vb" Trace=true%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<title>WebForm1</title>
<meta content="Microsoft Visual Studio.NET 7.0">
<meta content="Visual Basic 7.0">
<meta content="JavaScript">
<meta content="http://http://www.zjjv.com///intellisense/ie5">
<Script language="vb" runat="server">
Sub Button1_Click(Sender as object, e as EventArgs)
Trace.Write("Button1_Click", "Entering the Add routine")
Dim intTotal as integer
Dim intFirstNumber as integer
Dim intSecondNumber as integer
' Get values from the input boxes.
intFirstNumber = CInt(txtFirstNumber.Text)
intSecondNumber = CInt(txtSecondNumber.Text)
Trace.Write("Button1_Click", "Amount to add:" & _
CStr(intFirstNumber) & " and " & CStr(intSecondNumber))
' Get the total and display it.
intTotal = intFirstNumber + intSecondNumber
Trace.Write("Button1_Click", "Total:" & CStr(intTotal))
txtSum.Text = CStr(intTotal)
Trace.Write("Button1_Click", "Leaving the Add routine")
End Sub
</Script>
</HEAD>
<body MS_POSITIONING="GridLayout">
<form method="post" runat="server">
<TABLE cellSpacing="1" cellPadding="1">
<TR>
<TD><asp:Label runat="server">First Number:</asp:Label>
</TD>
<TD>
<asp:TextBox runat="server"></asp:TextBox>
</TD>
</TR>
<TR>
<TD>
<asp:Label runat="server">Second Number:</asp:Label>
</TD>
<TD>
<asp:TextBox runat="server"></asp:TextBox>
</TD>
</TR>
<TR>
<TD>
<asp:Label runat="server">Sum:</asp:Label>
</TD>
<TD>
<asp:TextBox runat="server"></asp:TextBox>
</TD>
</TR>
<TR>
<TD>
<asp:Button runat="server" Text="Add Numbers"></asp:Button>
</TD>
<TD>
</TD>
</TR>
</TABLE>
</form>
</body>
</HTML>
|
?????? ??? ???? ?? ?????????? ?? ?????? Microsoft ???????
????? ??? ? MSDN ??????:
.aspx http://http://www.zjjv.com///en-us/library/aa309369 (VS.71)
(http://http://www.zjjv.com///en-us/library/aa309369(VS.71).aspx)
http://http://www.zjjv.com///en-us/library/ms972204.aspx
(http://http://www.zjjv.com///en-us/library/ms972204.aspx)
?????? ??? ???? ?? ??????????
???? ??? ??? ??????? ?????? ?????? ?? Microsoft
????? ???????:
306172
(http://http://www.zjjv.com///kb/306172/
)
??? ??????? ??????? ??? ????? ASP.NET ????????? ?? Visual Studio.NET
|
???? ???????: 316726 - ????? ??? ??????: 29/???/1433 - ??????: 1.0
????? ???
Microsoft ASP.NET 1.1Microsoft ASP.NET 1.0
????? ??????:
kbdebug kbhowtomaster kbide kbwebforms kbmt KB316726 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????316726
(http://http://www.zjjv.com///kb/316726/en-us/
)
|