400+ câu trắc nghiệm Kịch bản ASP/Javascript/ PHP có đáp án - Phần 3

Cho đoạn lệnh sau, xác định chức năng của đoạn lệnh?sub Page_Load(obj as object, e as eventArgs)dim strVariable as string'set up some cookie variablesResponse.Cookies("MyASPNETPage")(

12/25

Cho đoạn lệnh sau, xác định chức năng của đoạn lệnh?

sub Page_Load(obj as object, e as eventArgs)

dim strVariable as string

'set up some cookie variables

Response.Cookies("MyASPNETPage")("Username") = "Sinhvien"

Response.Cookies("MyASPNETPage")("Password") = "TakeMeHome"

Response.Cookies("MyASPNETPage")("Preference") = "800x640"

Response.Cookies("MyASPNETPage")("UserAgent") = _

Request.ServerVariables("HTTP_USER_AGENT")

for each strVariable in Response.Cookies("MyASPNETPage").Values

lblCookies.Text += "" & strVariable & ": " & _

Request.Cookies("MyASPNETPage")(strVariable) & "

"

next

end sub

Dùng Respone để lưu trữ 1 số thông tin

Dùng Request để lưu trữ 1 số thông tin

Dùng Variables để lưu trữ 1 số thông tin

Dùng Cookies để lưu trữ 1 số thông tin

Giải thích

Chọn đáp án D