public string Hello(string name="World") { //return "Hello" + HttpUtility.HtmlEncode(name); return "Hello" + Server.HtmlEncode(name); }
当name参数未被赋值时,则name被赋值为"World";
当name参数值不为空时,则name被参数赋值。
posted on 2018-02-10 16:56 TheHeist 阅读(171) 评论(0) 编辑 收藏 举报