ASP ContentType లక్షణం
ContentType లక్షణం రెస్పాంస్ ఆబ్జెక్ట్కు HTTP కంటెంట్ టైప్ సెట్ చేస్తుంది.
సింతాక్స్:
response.ContentType[=contenttype]
పారామీటర్స్ | వివరణ |
---|---|
contenttype |
కంటెంట్ టైప్ వివరణ స్ట్రింగ్. పూర్తి కంటెంట్ టైప్ జాబితా కొరకు, మీ బ్రౌజర్ దస్తావేజు లేదా HTTP ప్రామాణాలు చూడండి. |
ఉదాహరణ
అస్ప్ పేజీ ContentType లక్షణం సెట్ చేయకపోయినట్లయితే, మూలతాలిక కంటెంట్-టైప్ హెడర్ ఇలా ఉంటుంది:
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 ఎలక్ట్రానిక్ సెల్ టేబుల్ తెరుస్తుంది (ఉపయోగదారుడు ఇక్కడికి Excel ఇన్స్టాల్ చేసినట్లయితే):
<%response.ContentType="application/vnd.ms-excel"%> <html>
1 | 2 | 3 | 4 |
5 | 6 | 7 | 8 |