ASP ContentType پرزنتی
ContentType پرزنتی response آئی ویونٹ کو HTTP contents type تنظیم کرتی ہے。
گرامر:
response.ContentType[=contenttype]
پارامتر | توضیح |
---|---|
contenttype |
contents type کی توضیح کا سٹرنگ کاملی طرح کی contents type کی لسٹ کے لئے آپ کا بروزر کا ڈاکومنٹ یا HTTP معیارات کو دیکھیں。 |
مثال
اگر ASP پیج میں ContentType پرزنتی کی نشانی نہ ہو، تو default 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>