Cyclic structure:
For, Do ... while, while, foreach ... in
function:
Press value transmission parameters:
Press the reference Parameters:
Output parameters
Its value is not set before calling, in the code runtime setting, can be used later; for the called function, such parameters are only written. In C #, such parameters are called output parameters, using OUT keywords in parameter definition and parameter calls.
<% @ Page language = "c #" contenttype = "text / html" responseEncoding = "GB2312"%>
String setNumber (out int number1) {
Number1 = 25; return "ok";
Void Page_Load ()
{
Int a;
String ReturnValue = setNumber (OUT A);
Message.text = a.tostring ();
Message.text = "<" RETURNVALUE;
}
script>
Scope of the variable:
Local variable:
Block-level variable:
Global variable:
Event driver programming and playback
ASP.NET event:
Page_init ()
Page_load ()
Page_unload ()
Events in HTML:
, , and other tags have some universal properties:OnMouseup
OnMouseDown
OnMouseover
OnMousemove
Onclick
Ondblclick
ONKEYUP
OnkeyPress
OnkeyDown
Server control events in ASP.NET:
ONLOAD triggers when the control is loaded on the PAGE object
ONUNLOAD When the control is released from memory
OnClick / OnCommand When the form is submitted to the server, when the mouse hover is on the
OnInT triggered when initializing the control for the first time
Onprender display control before
DISPOSED controls trigger from memory
DataBinding control is binding to data sources
There are still some events that cannot be handled in the event handler, and the contents can be triggered in the ASP.NET and modify the content of ViewState (they can also be processed for client events). SelectIndexchanged
CheckChange is triggered when the content of the control changes.
TextChanged
ASP.NET button server control:
To edit a separate server event for the button, it is not placed in an event such as Page_Load, but writes directly in Script, but you need to pass two parameters: Sender and E.
example: