转自:http://exception.thinksaas.cn/0/173/173623.html
在WebMethod的description 中可使用超文本,
举例:
如上图中,红框类的WebService的接口说明是如何实现的?
1、加粗字体的标题2、换行3、链接4、图标这是服务接口http://www.webxml.com.cn/WebServices/WeatherWebService.asmx
------解决思路---------------------- [WebService(Namespace = "http://tempuri.org/",Description="说明1")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] [System.ComponentModel.ToolboxItem(false)] // [System.Web.Script.Services.ScriptService] public class WebService1 : System.Web.Services.WebService { [WebMethod(Description="说明2")] public string HelloWorld() { return "Hello World"; } }------解决思路----------------------Description里面可以放超文本 [WebMethod(Description="<h1>This is a test method</h1><br /> It returns hello world </br> enjoy it. <br/><br/> <a href='http://www.microsoft.com'>test link</a>")] public string HelloWorld() { return "Hello World"; }