本文整理汇总了C#中IHttpResponse.End方法的典型用法代码示例。如果您正苦于以下问题:C# IHttpResponse.End方法的具体用法?C# IHttpResponse.End怎么用?C# IHttpResponse.End使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IHttpResponse
的用法示例。
在下文中一共展示了IHttpResponse.End方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProcessRequest
public void ProcessRequest(IHttpRequest httpReq, IHttpResponse httpRes, string operationName)
{
if (!LocalOnly || httpReq.IsLocal)
{
httpRes.ContentType = "application/json";
ProcessOperations(httpRes.OutputStream, httpReq);
}
else
{
httpRes.StatusCode = (int)HttpStatusCode.NotFound;
httpRes.End();
}
}
示例2: WritePage
private void WritePage(IHttpResponse response, string body)
{
response.Write (@"<html>
<head>
<meta http-equiv=""Content-Type"" content=""text/html; charset=iso-8859-1"">
<title>Manos Documentation Browser</title>
<style type=""text/css"">
html,
body {
font-family: Arial, Helvetica, sans-serif;
font-size: 13px;
}
h2 {
margin-top: 10px;
}
#wrapper {
margin: 0 auto;
width: 700px;
}
#header {
color: #333;
width: 700px;
padding: 10px;
height: 100px;
margin: 10px 0px 5px 0px;
background: #D1DBDB;
}
#nav {
display: inline;
color: #333;
margin: 10px;
padding: 0px;
width: 220px;
float: right;
}
#main {
float: left;
color: #333;
margin: 10px;
padding: 0px;
width: 400px;
display: inline;
position: relative;
}
.clear { clear: both; background: none; }
</style>
</head>
<body>
<div id=""wrapper"">
<div id=""header"">
<h1>Manos Documentation Browser</h1>
</div>
<div id=""nav"">");
WriteNavigation (response);
response.Write (@" </div>
<div id=""main"">");
response.Write (body);
response.Write (@" </div>
</div>
</body>
</html>");
response.End ();
}