• λ我爱Aspx >> Asp.Net >> 用浏览器来接收C# 的程序返回的时间cool!
  • 用浏览器来接收C# 的程序返回的时间cool!

  • :未知  Դ:internet  :2007-5-20 16:44:09  ؼ:c#
  • } catch(FileNotFoundException) {

    writeFailure();

    sw.WriteLine("File not found: " + url);

    }

    sw.Flush();

    }

    public void writeSuccess() {

    sw.WriteLine("HTTP/1.1 200 OK");

    sw.WriteLine("Server: Microsoft-IIS/5.0");

    sw.WriteLine("Date: Mon, 27 Nov 2000 08:19:43 GMT");

    sw.WriteLine("Content-Length: 6");

    sw.WriteLine("Content-Type: text/html");

    sw.WriteLine("");

    String strDateLine;

    DateTime now;

    now = DateTime.Now;

    strDateLine = now.ToShortDateString() + " " + now.ToLongTimeString();

    sw.WriteLine(strDateLine);

    }

    public void writeFailure() {

    sw.WriteLine("HTTP/1.0 404 File not found");

    sw.WriteLine("Connection: close");

    sw.WriteLine();

    }

    }

    public class HttpServer {

    public HttpServer() : this(81) {

    }

    public HttpServer(int port) {

    Ҷƪл˵?
  • һƪ用Asp.net实现简单的文字水印
    һƪ使用C# 编写扩展存储过程