Re: ASP.NET VB HTTP Header senden



Hi,

Wie kann ich in ASP.NET mit VB ein HTTP Header senden, wie man es z.B.
in PHP wie folgend machen würde?

<?php header("Content-type: application/xhtml+xml"); ?>

Per

  Response.AddHeader("Content-type", "application/xhtml+xml");

Oder gleich per

  Response.ContentType = "application/xhtml+xml";

<?php
if ( stristr($ SERVER["HTTP ACCEPT"],"application/xhtml+xml") ) {

if(Request.ServerVariables["HTTP_ACCEPT"].Equals("application/xhtml+xml")) { Response.ContentType = "application/xhtml+xml"; else Response.ContentType = "text/html";

Mit freundlichen Grüssen / With best regards

--
Karsten Samaschke
IT-Consulting, IT-Development, IT-Training
5x MS MVP ASP / ASP.NET, Germany
Homepage: http://www.ksamaschke.de
Weblog: http://www.karsan.de
- - - - - - - - - - - - - - - - - - - - - - - - - -
ASP.NET Portal: http://www.aspextra.de
My Books: http://books.ksamaschke.de


.



Relevant Pages