0)then response.write(request.form("a")) end if if(len(request.querystring("a")) > 0)then a = request.querystring("a") response.write(a) end if %>"> 0)then response.write(request.form("a")) end if if(len(request.querystring("a")) > 0)then a = request.querystring("a") response.write(a) end if %>">

งานนำเสนอกำลังจะดาวน์โหลด โปรดรอ

งานนำเสนอกำลังจะดาวน์โหลด โปรดรอ

Page: 1 การพัฒนาโปรแกรมประยุกต์บนเว็บ อ. บุรินทร์ รุจจนพันธุ์.. ปรับปรุง 28 มิถุนายน 2550 Get, Post, Session, Cookies มหาวิทยาลัยโยนก.

งานนำเสนอที่คล้ายกัน


งานนำเสนอเรื่อง: "Page: 1 การพัฒนาโปรแกรมประยุกต์บนเว็บ อ. บุรินทร์ รุจจนพันธุ์.. ปรับปรุง 28 มิถุนายน 2550 Get, Post, Session, Cookies มหาวิทยาลัยโยนก."— ใบสำเนางานนำเสนอ:

1 http://www.thaiall.com/asp Page: 1 การพัฒนาโปรแกรมประยุกต์บนเว็บ อ. บุรินทร์ รุจจนพันธุ์.. ปรับปรุง 28 มิถุนายน 2550 Get, Post, Session, Cookies มหาวิทยาลัยโยนก จังหวัด ลำปาง ศูนย์กลางความรู้และภูมิปัญญา แผ่นดิน http://www.yonok.ac.th

2 http://www.thaiall.com/asp Page: 2 HTML of GET & POST http://localhost/x.htm

3 http://www.thaiall.com/asp Page: 3 แสดงค่าที่รับเข้ามาจาก GET และ POST <% ‘ y.asp a = "" if(len(request.form("a")) > 0)then response.write(request.form("a")) end if if(len(request.querystring("a")) > 0)then a = request.querystring("a") response.write(a) end if %>

4 http://www.thaiall.com/asp Page: 4 แสดงค่าใน servervariables <? for each Item in request.servervariables response.write Item & " = " a = request.servervariables(Item) response.write (a & " ”) next ?>

5 http://www.thaiall.com/asp Page: 5 global.asa ถ้าเก็บแฟ้ม global.asa ในห้องที่เก็บ แฟ้ม.asp ผลคือ เมื่อเปิดแฟ้มที่สกุล.asp ใดก็ตาม IIS จะช่วย แทรกภาพมุมบนซ้าย ในเว็บเพจนั้น สามารถนำไปใช้เพิ่ม counter ให้ทุกหน้าโดยอัตโนมัติ sub Session_OnStart response.write " " Session.Abandon end sub

6 http://www.thaiall.com/asp Page: 6 กำหนด และใช้งาน เซสชัน (Session) <? session("a") = request.form("a") response.write(session(“a”)) dim i For Each i in Session.StaticObjects Response.Write(i & " ") Next response.end ?> ข้อมูลจาก http://www.w3schools.com/asp/asp_sessions.asp

7 http://www.thaiall.com/asp Page: 7 กำหนดค่าให้กับ คุกกี้ (Cookies) <? intPollID=19 Response.Cookies("PollId")=intPollID Response.Cookies("PollId").Expires=Now+60 ?> ข้อมูลจาก http://www.codefixer.com/tutorials/cookies.asp

8 http://www.thaiall.com/asp Page: 8 นำ คุกกี้ (Cookies) มาใช้ <% PollID = 19 voteid= Request.Cookies("PollID") If Cint(voteid) = Cint(PollID) Then response.write "already vote" Else ’ show poll End If %> ข้อมูลจาก http://www.codefixer.com/tutorials/cookies.asp


ดาวน์โหลด ppt Page: 1 การพัฒนาโปรแกรมประยุกต์บนเว็บ อ. บุรินทร์ รุจจนพันธุ์.. ปรับปรุง 28 มิถุนายน 2550 Get, Post, Session, Cookies มหาวิทยาลัยโยนก.

งานนำเสนอที่คล้ายกัน


Ads by Google