ASP.Net/Response/Response Type

Материал из .Net Framework эксперт
Перейти к: навигация, поиск

Set response type to xml (VB.net)

   <source lang="csharp">

<%@ Page Language="vb" %> <html>

  <head>
     <title>Response property example</title>
     <script runat="server">
        Sub Page_Load()
           Response.ContentType = "text/xml"
           Message.Text = "This page will be displayed as XML in " & _
              "Internet Explorer 5.0 or above."
        End Sub
     </script>
  </head>

<body>

  <asp:label id="Message" runat="server"/>

</body> </html>

      </source>