{"id":242,"date":"2007-02-06T21:51:00","date_gmt":"2007-02-06T21:51:00","guid":{"rendered":"http:\/\/marvelliu.wordpress.com\/2007\/02\/06\/%e8%af%95%e7%94%a8mono%ef%bc%88-%e4%b8%89%ef%bc%89%e6%96%b0%e5%bb%baweb%e5%ba%94%e7%94%a8%e7%af%87"},"modified":"2007-02-06T21:51:00","modified_gmt":"2007-02-06T21:51:00","slug":"%e8%af%95%e7%94%a8mono%ef%bc%88-%e4%b8%89%ef%bc%89%e6%96%b0%e5%bb%baweb%e5%ba%94%e7%94%a8%e7%af%87","status":"publish","type":"post","link":"https:\/\/marvelliu.space\/?p=242","title":{"rendered":"\u8bd5\u7528mono\uff08 \u4e09\uff09\u65b0\u5efaWeb\u5e94\u7528\u7bc7"},"content":{"rendered":"<p>\u4eca\u5929\u6211\u4ecb\u7ecdmono\u7684\u4e09\u4e2a\u90e8\u5206\uff1aASP.Net\u9879\u76ee\u3002Mono\u4e0a\u7684ASP.Net Web\u5e94\u7528\u53ef\u4ee5\u6709\u4e24\u79cd\u65b9\u5f0f\u8fd0\u884c\uff0c\u7b2c\u4e00\u79cd\u662fapache\uff0bmono module\u7684\u65b9\u5f0f\uff0c\u7b2c\u4e8c\u79cd\u662fxsp standalone\u7684\u65b9\u5f0f\u3002\u6211\u7528\u7684\u662f\u7b2c\u4e8c\u79cd\uff0cxsp\u662f\u4e00\u4e2a\u7528C#\u5199\u7684\u7b80\u5355\uff08\u6216\u8005\u8bf4\u8f7b\u91cf\u7ea7&gt;\u4e5f\u53ef\uff09\u7684web\u670d\u52a1\u5668\uff0c\u7528\u4e8e\u8fd0\u884cASP.NET 1.1\u548c2.0\u7684\u7a0b\u5e8f\u3002<\/p>\n<p>\u5728\u7684mono\u7248\u672c\u5df2\u7ecf\u5b8c\u5168\u5b9e\u73b0\u4e86ASP.NET\u7684\u6240\u6709\u529f\u80fd\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u4f60\u5728windows\u4e0b\u5199\u7684ASP.NET\u7a0b\u5e8f\u5728linux\u4e0b\u7684mono\u4e0b\u4e5f\u53ef\u4ee5\u8fd0\u884c\u3002\u5f53\u7136\u8fd9\u91cc\u7684\u201clinux\u201d\u53ea\u4e0d\u8fc7\u662f\u5f3a\u8c03\u4e00\u4e0b\uff0c\u4f5c\u4e3a\u4e00\u4e2a\u8f7b&gt;\u91cf\u7ea7\u7684C\uff03 Server\uff0cxsp\u4e5f\u53ef\u4ee5\u5728windows\u4e0b\u8fd0\u884c\u7684\u3002<\/p>\n<p>\u6211\u4eec\u5f00\u59cb\u5427\uff0c\u9996\u5148\u9009\u62e9File -&gt; New Project&#8230; -&gt; C# -&gt; ASP.NET -&gt; Web Application\u3002\u8fd9\u6837\uff0cmono\u4f1a\u751f\u6210\u4e00\u4e2a\u7b80\u5355\u7684ASP.NET\u7a0b\u5e8f\uff0cDefault\u9875\u9762\u4e2d\u5e26\u6709\u4e00\u4e2aTextBox\u548c\u4e00\u4e2aButton&gt;\u3002\u6211\u4eec\u8fdb\u884c\u6269\u5c55\u4e00\u4e0b\u3002<\/p>\n<p><a href=\"http:\/\/marvel.hit.edu.cn:8080\/wp-content\/uploads\/2007\/02\/screenshot-local1-defaultaspxcs-monodevelop.png\" title=\"Direct link to file\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/marvel.hit.edu.cn:8080\/wp-content\/uploads\/2007\/02\/screenshot-local1-defaultaspxcs-monodevelop.thumbnail.png\" alt=\"ASP.NET Dev\" height=\"122\" width=\"171\" \/><\/a><\/p>\n<p><\/p>\n<p>\u5de6\u9762\u7684Solution\u5de5\u5177\u680f\u4e2d\u53cc\u51fbDefault.aspx\uff0c\u8fd9\u65f6\u51fa\u73b0Default.aspx\u7684\u524d\u7aef\u4ee3\u7801\u3002\u6211\u4eec\u6dfb\u52a0\u4e00\u4e2aLabel\uff0c\u540c\u65f6\u628a\u9875\u9762\u4fee\u6539\u4e00\u4e0b\uff0c\u52a0\u4e00\u4e9b\u6807\u9898\u548c\u5206\u5272\u7b26\u3002\u5982\u4e0b\uff1a<\/p>\n<p>\t<title>Default<\/title><\/p>\n<p>\t<\/p>\n<form>\t\t<\/p>\n<p><h1>This is an ASP.Net Web application test on mono<\/h1>\n<\/p>\n<p>\t\t<\/p>\n<p>\t\t<\/p>\n<\/p><\/form>\n<p>Solution\u5de5\u5177\u680f\u4e2d\u53cc\u51fbDefault.aspx\u91cc\u9762\u7684Inherits Default in Default.aspx.cs\uff0c\u8fd9&gt;\u65f6\u51fa\u73b0\u4e86Default.aspx\u7684\u540e\u7aef\u5904\u7406\u4ee3\u7801\uff0c\u6211\u4eec\u6dfb\u52a0\u4e00\u4e2a\u63a7\u4ef6Label\uff0c\u5e76\u4fee\u6539\u4e00\u4e0b\u4e8b\u4ef6\u4ee3\u7801\uff1a<\/p>\n<p>using System;<br \/>using System.Web;<br \/>using System.Web.UI;<br \/>namespace local1<br \/>{<br \/>\tpublic class Default : Page<br \/>\t{<br \/>\t\tprotected System.Web.UI.HtmlControls.HtmlForm form1;<br \/>\t\tprotected System.Web.UI.WebControls.TextBox textBox1;<br \/>\t\tprotected System.Web.UI.WebControls.Button button1;\t\t<br \/>\t\tprotected System.Web.UI.WebControls.Label label1;\t\t<br \/>\t\tpublic virtual void onButtonClick(object sender, EventArgs e)<br \/>\t\t{<br \/>\t\t\tthis.label1.Text = &#8220;Welcome : <font color='red'>&#8221; + textBox1.Text + &#8220;<\/font>&#8220;;<br \/>\t\t}<br \/>\t}<br \/>}<\/p>\n<p><a href=\"http:\/\/marvel.hit.edu.cn:8080\/wp-content\/uploads\/2007\/02\/default-page-iceweasel.png\" title=\"Direct link to file\"><img loading=\"lazy\" decoding=\"async\" src=\"http:\/\/marvel.hit.edu.cn:8080\/wp-content\/uploads\/2007\/02\/default-page-iceweasel.thumbnail.png\" alt=\"ASP.NET Web Page\" height=\"122\" width=\"171\" \/><\/a><\/p>\n<p><\/p>\n<p>\u7f16\u8bd1F5\uff0c\u4e4b\u540e\u6d4f\u89c8\u5668\u4f1a\u51fa\u73b0\u4e00\u4e2aDefault.aspx\u7684\u9875\u9762\u3002\u6211\u4eec\u6587\u672c\u6846\u4e2d\u8f93\u5165\u4e00\u4e2a\u5b57\u7b26\u4e32\uff0c\u70b9\u51fb\u6309\u94ae\uff0clabel\u663e\u793a\u6b22\u8fce\u5b57\u7b26\u4e32\uff0c\u5982\u4e0a\u56fe\u6240\u793a\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u4eca\u5929\u6211\u4ecb\u7ecdmono\u7684\u4e09\u4e2a\u90e8\u5206\uff1aASP.Net\u9879\u76ee\u3002Mono\u4e0a\u7684ASP.Net Web\u5e94\u7528\u53ef\u4ee5\u6709\u4e24\u79cd\u65b9\u5f0f\u8fd0\u884c\uff0c\u7b2c\u4e00\u79cd\u662fapache\uff0bmono module\u7684\u65b9\u5f0f\uff0c\u7b2c\u4e8c\u79cd\u662fxsp standalone\u7684\u65b9\u5f0f\u3002\u6211\u7528\u7684\u662f\u7b2c\u4e8c\u79cd\uff0cxsp\u662f\u4e00\u4e2a\u7528C#\u5199\u7684\u7b80\u5355\uff08\u6216\u8005\u8bf4\u8f7b\u91cf\u7ea7&gt;\u4e5f\u53ef\uff09\u7684web\u670d\u52a1\u5668\uff0c\u7528\u4e8e\u8fd0\u884cASP.NET 1.1\u548c2.0\u7684\u7a0b\u5e8f\u3002 \u5728\u7684mono\u7248\u672c\u5df2\u7ecf\u5b8c\u5168\u5b9e\u73b0\u4e86ASP.NET\u7684\u6240\u6709\u529f\u80fd\uff0c\u4e5f\u5c31\u662f\u8bf4\uff0c\u4f60\u5728windows\u4e0b\u5199\u7684ASP.NET\u7a0b\u5e8f\u5728linux\u4e0b\u7684mono\u4e0b\u4e5f\u53ef\u4ee5\u8fd0\u884c\u3002\u5f53\u7136\u8fd9\u91cc\u7684\u201clinux\u201d\u53ea\u4e0d\u8fc7\u662f\u5f3a\u8c03\u4e00\u4e0b\uff0c\u4f5c\u4e3a\u4e00\u4e2a\u8f7b&gt;\u91cf\u7ea7\u7684C\uff03 Server\uff0cxsp\u4e5f\u53ef\u4ee5\u5728windows\u4e0b\u8fd0\u884c\u7684\u3002 \u6211\u4eec\u5f00\u59cb\u5427\uff0c\u9996\u5148\u9009\u62e9File -&gt; New Project&#8230; -&gt; C# -&gt; ASP.NET -&gt; Web Application\u3002\u8fd9\u6837\uff0cmono\u4f1a\u751f\u6210\u4e00\u4e2a\u7b80\u5355\u7684ASP.NET\u7a0b\u5e8f\uff0cDefault\u9875\u9762\u4e2d\u5e26\u6709\u4e00\u4e2aTextBox\u548c\u4e00\u4e2aButton&gt;\u3002\u6211\u4eec\u8fdb\u884c\u6269\u5c55\u4e00\u4e0b\u3002 \u5de6\u9762\u7684Solution\u5de5\u5177\u680f\u4e2d\u53cc\u51fbDefault.aspx\uff0c\u8fd9\u65f6\u51fa\u73b0Default.aspx\u7684\u524d\u7aef\u4ee3\u7801\u3002\u6211\u4eec\u6dfb\u52a0\u4e00\u4e2aLabel\uff0c\u540c\u65f6\u628a\u9875\u9762\u4fee\u6539\u4e00\u4e0b\uff0c\u52a0\u4e00\u4e9b\u6807\u9898\u548c\u5206\u5272\u7b26\u3002\u5982\u4e0b\uff1a Default This is an ASP.Net Web application test on mono Solution\u5de5\u5177\u680f\u4e2d\u53cc\u51fbDefault.aspx\u91cc\u9762\u7684Inherits Default in Default.aspx.cs\uff0c\u8fd9&gt;\u65f6\u51fa\u73b0\u4e86Default.aspx\u7684\u540e\u7aef\u5904\u7406\u4ee3\u7801\uff0c\u6211\u4eec\u6dfb\u52a0\u4e00\u4e2a\u63a7\u4ef6Label\uff0c\u5e76\u4fee\u6539\u4e00\u4e0b\u4e8b\u4ef6\u4ee3\u7801\uff1a using System;using System.Web;using System.Web.UI;namespace local1{ public class Default : Page { protected System.Web.UI.HtmlControls.HtmlForm form1; protected System.Web.UI.WebControls.TextBox textBox1; protected System.Web.UI.WebControls.Button button1; protected System.Web.UI.WebControls.Label &hellip; <a href=\"https:\/\/marvelliu.space\/?p=242\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;\u8bd5\u7528mono\uff08 \u4e09\uff09\u65b0\u5efaWeb\u5e94\u7528\u7bc7&#8221;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[21],"tags":[],"class_list":["post-242","post","type-post","status-publish","format-standard","hentry","category-tech"],"_links":{"self":[{"href":"https:\/\/marvelliu.space\/index.php?rest_route=\/wp\/v2\/posts\/242","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/marvelliu.space\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/marvelliu.space\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/marvelliu.space\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/marvelliu.space\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=242"}],"version-history":[{"count":0,"href":"https:\/\/marvelliu.space\/index.php?rest_route=\/wp\/v2\/posts\/242\/revisions"}],"wp:attachment":[{"href":"https:\/\/marvelliu.space\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=242"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/marvelliu.space\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=242"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/marvelliu.space\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=242"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}