ASP.Net/Response/Content — различия между версиями

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

Текущая версия на 14:54, 26 мая 2010

Checking Content Type (VB.net)

   <source lang="csharp">

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

  <head>
     <title>Checking Content Type in ASP.NET</title>
     <script runat="server">
        Sub Page_Load()
           Message.Text = "Current content type is " & _
              Response.ContentType & "</br>"
        End Sub
     </script>
  </head>

<body>

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

</body> </html>

      </source>
   
  


Suppressing content (VB.net)

   <source lang="csharp">

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

  <head>
     <title>Suppressing content in ASP.NET</title>
     <script runat="server">
        Sub Page_Load()
           Response.Write("nfex.ru!")
           Response.SuppressContent = True
           If Response.SuppressContent Then Response.Close()
        End Sub
     </script>
  </head>

<body>

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

</body> </html>

      </source>