Mega Code Archive

 
Categories / ASP.Net Tutorial / Page Lifecycle
 

Response StatusCode

<%@ Page Language="vb" %> <html>    <head>       <title>Sending status in ASP.NET</title>       <script runat="server">          Sub Page_Load()             Response.StatusCode = 542             Response.StatusDescription = "Server Error - The code is the answer."             Response.End()          End Sub       </script>    </head> <body>    <asp:label id="myMessage" runat="server"/> </body> </html>