QueryString是一種非常簡單的傳值方式
a
private void Button
{
string s_url;
s_url =
Response
}
b
private void Page_Load(object sender
{
Label
}
Application對象的作用范圍是整個全局
a
private void Button
{
Application[
Server
}
b
private void Page_Load(object sender
{
string name;
Application
name = Application[
Application
}
想必這個肯定是大家使用中最常見的用法了
a
private void Button
{
Session[
}
b
private void Page_Load(object sender
{
string name;
name = Session[
}
這個也是大家常使用的方法
a
private void Button
{
HttpCookie cookie_name = new HttpCookie(
cookie_name
Reponse
Server
}
b
private void Page_Load(object sender
{
string name;
name = Request
}
這個才可以說是面象對象開發所使用的方法
a
public string Name
{
get{ return Label
}
private void Button
{
Server
}
b
private void Page_Load(object sender
{
a newWeb; //實例a窗體
newWeb = (source)Context
string name;
name = newWeb
}
From:http://tw.wingwit.com/Article/program/net/201311/11559.html