ASP ContentType ਪ੍ਰਤੀਯੋਗਿਤਾ

ریسپانس اوبجیکٹ مراجع دستورات

ContentType ਪ੍ਰਤੀਯੋਗਿਤਾ response ਆਬਜੈਕਟ ਨੂੰ HTTP content-type ਸੈਟ ਕਰਦਾ ਹੈ。

ਗਰੰਥਕ

response.ContentType[=contenttype]
ਪੈਰਾਮੀਟਰ ਵਰਣਨ
contenttype

content-type ਦੇ ਵਰਣਨ ਦੀ ਲਘੂ ਚਿੱਤਰ

ਪੂਰੀ content-type ਸੂਚੀ ਲਈ ਆਪਣੇ ਬਰਾਉਜ਼ਰ ਦੇ ਦਸਤਾਵੇਜ਼ ਜਾਂ 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"%>

ਇਹ ਉਦਾਹਰਣ ਬਰਾਉਜ਼ਰ ਵਿੱਚ ਇੱਕ ਐਕਸਲ ਈਲੈਕਟ੍ਰੌਨਿਕ ਸ਼ੈਡੂਲ (ਜੇਕਰ ਉਪਭੋਗਤਾ ਐਕਸਲ ਇੰਸਟਾਲ ਕਰ ਚੁੱਕਾ ਹੈ) ਖੋਲ੍ਹੇਗਾ:

<%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>

ریسپانس اوبجیکٹ مراجع دستورات