|
 |
|
ต้องการ เมื่อเปิดหน้าครั้งแรกให้เข้าไปทำงานทุกฟังชั่นใน Page_Load แต่หากหน้าไม่ถูก refresh จะไม่ให้เข้าไปทำฟังชั่นต่างๆๆ |
|
 |
|
|
 |
 |
|
ใช้ พวก Session ครับ
Code (C#)
protected void Page_Load(object sender, EventArgs e)
{
if (Session["xxx"] == "")
{
Validate();
Session["xxx"] = "Y";
}
}
ประมาณนี้ครับ
|
 |
 |
 |
 |
Date :
2012-08-07 06:38:35 |
By :
mr.win |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
refresh กับ postback ไม่เหมือนกันนะจ๊ะ
|
 |
 |
 |
 |
Date :
2012-08-07 07:32:36 |
By :
อิอิ |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
แล้ว PostBack มีไว้ทำอะไรหรอคะ ใช้ตอนไหน ช่วยยกตัวอย่างให้ได้ไหมคะ
ขอบคุณคะ
|
ประวัติการแก้ไข 2012-08-07 11:24:55
 |
 |
 |
 |
Date :
2012-08-07 11:20:56 |
By :
nongnoo |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
 |
|
|
 |
 |
|
อาการที่แสดงว่ามีการ postback คือกด refresh แล้วมี dialog ขึ้นมาน่ะครับ
|
 |
 |
 |
 |
Date :
2012-08-07 12:55:40 |
By :
อิอิ |
|
 |
 |
 |
 |
|
|
 |
 |
|
 |
 |
|
|
|

|
Load balance : Server 02
|