資源簡介
MyMVC 版本更新日志(以文件版本為準)
------------------------------------------
1.3.0.816
------------------------------------------
1. 給PageResult,UcResult各增加了一個構造函數的重載版本。
1.3.0.728
------------------------------------------
1. 支持類型的隱式類型轉換(string做為輸入條件),用于為Action準備參數時,自定義從string到目標數據類型的轉換
2. 將類型ActionExecutor由public改成internal
1.3.0.610
------------------------------------------
1. 增加ServiceHandlerFactory,功能與AjaxHandlerFactory類似,但是URL格式更靈活。
2. 優化了Controller的查找過程。
1.3.0.511
------------------------------------------
1. 增加對虛擬目錄的支持。
1.3.0.413
------------------------------------------
1. 增加了ResponseWriter工具類,用于快速實現BigPipe
1.3.0.330
------------------------------------------
1. 增加JSON傳入格式的支持,請參考:TestSerializer.htm
2. 增加XML傳入格式的支持,請參考:TestSerializer.htm
3. 增加XML輸出格式的支持,XmlResult
4. 增加GzipModule,允許客戶端要求GZIP響應,xhr.setRequestHeader("X-Gzip-Respond", "1");
1.3.0.211
------------------------------------------
1. 優化反射性能,增加OptimizeReflection目錄
1.2.0.120
------------------------------------------
1. 增加HttpValueIgnoreAttribute
2. ActionAttribute增加 Verb 屬性,用于區分重載方法。
3. 增加VoidType,用于區分同名的Action重載方法。
代碼片段和文件信息
using?System;
using?System.Collections.Generic;
using?System.Linq;
using?System.Web;
using?System.Web.Services;
using?MyMVC;
using?System.Text;
///?
///WebService1?的摘要說明
///?
[WebService(Namespace?=?“http://tempuri.org/“)]
[WebServiceBinding(ConformsTo?=?WsiProfiles.BasicProfile1_1)]
//若要允許使用?ASP.NET?AJAX?從腳本中調用此?Web?服務,請取消對下行的注釋。?
[System.Web.script.Services.scriptService]
public?class?WebService1?:?System.Web.Services.WebService?{
????public?WebService1?()?{
????????//如果使用設計的組件,請取消注釋以下行?
????????//InitializeComponent();?
????}
[WebMethod]
public?int?Add(int?a?int?b)
{
return?a?+?b;
}
[WebMethod]
public?string?AddCustomer(Customer?customer)
{
if(?customer?==?null?)
return?“customer?is?null.“;
//?簡單地返回一個xml字
評論
共有 條評論