ຄວາມມູນ ContentType ASP

ຄູ່ມືສິນລະປະສານ response

ຄວາມມູນ ContentType ສ້າງຄວາມມູນ HTTP Content Type ສໍາລັບບັນດາ response.

ຄຳສັບສັນ:

response.ContentType[=contenttype]
ຄວາມມູນ ຄຳອະທິບາຍ
contenttype

ຄຳອະທິບາຍຄວາມມູນຂອງການຄົ້ນຄວ້າ.

ສຳລັບລາຍການຄວາມມູນທີ່ສົມບູນ, ກະລຸນາບັນວັດບັດເບິ່ງໃນເອກະສານບັດເບິ່ງຂອງບຸບຄົນຂອງທ່ານຫຼື HTTP ຄວາມມູນ.

ຄວາມສະແດງ

ຖ້າເວັບ ASP ບໍ່ໄດ້ກຳນົດຄວາມມູນ content-type, ຄວາມມູນ content-type ດດວນແມ່ນ:

content-type:text/html

ບັນດາຄູ່ມູນທີ່ໃຊ້ຫຼາຍຂອງ ContentType:

<%response.ContentType="text/HTML"%>
<%response.ContentType="image/GIF"%>
<%response.ContentType="image/JPEG"%>
<%response.ContentType="text/plain"%>
<%response.ContentType="image/JPEG"%>

ບົດການນີ້ຈະເປີດໃນສະຕູໂດຍສານເອເລັກສະຕີລີ(ຖ້າຜູ້ນຳໃຊ້ໄດ້ຖືກຕິດຕັ້ງ Excel):

<%response.ContentType="application/vnd.ms-excel"%>
<html>
<body>
<table>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
</tr>
<tr>
<td>5</td>
<td>6</td>
<td>7</td>
<td>8</td>
</tr>
</table>
</body>
</html>

ຄູ່ມືສິນລະປະສານ response