ASP ContentType Property
❮ ပြီးပြည့်စုံသော တုံ့ပြန်မှု Object ရည်ညွှန်းချက်
ContentType ပိုင်ဆိုင်မှုသည် တုံ့ပြန်သည့်အရာအတွက် HTTP အကြောင်းအရာအမျိုးအစားကို သတ်မှတ်ပေးသည်။
အထားအသို
response.ContentType[=contenttype]
Parameter | Description |
---|---|
contenttype | A string describing the content type.
For a full list of content types, see your browser documentation or the HTTP specification. |
ဥပမာများ
ASP စာမျက်နှာတစ်ခုတွင် ContentType ပိုင်ဆိုင်မှုကို မသတ်မှတ်ထားပါက၊ မူရင်းအကြောင်းအရာအမျိုးအစား ခေါင်းစီးသည်-
content-type:text/html
အခြားသော အသုံးများသော ContentType တန်ဖိုးများ-
<%response.ContentType="text/HTML"%>
<%response.ContentType="image/GIF"%>
<%response.ContentType="image/JPEG"%>
<%response.ContentType="text/plain"%>
ဤဥပမာသည် ဘရောက်ဆာတစ်ခုတွင် Excel ဇယားကွက်ကို ဖွင့်ပေးမည် (အသုံးပြုသူက 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>
❮ ပြီးပြည့်စုံသော တုံ့ပြန်မှု Object ရည်ညွှန်းချက်