2015-08-13 58 views
-1

目前,我開始使用ext.net mvc。所以,對我而言,一切都是新的。請幫助我。它顯示的是分機沒有定義。我認爲它缺少一些js文件。我創建了Indext.cshtml,代碼如下: 預先感謝您。分機不在ext.net中定義mvc

@{ 
ViewBag.Title = "Index"; 
    } 

<script> 
Ext.onReady(function() { 
    alert('start'); 
var myparams1 = new Object(); 
myparams1.id = 1; 
Ext.Ajax.request({ 
    url: 'Services/AService.svc/GetMyData'  
    method: 'GET', 
    success: function (response, options) { 
     // response callback 
     alert('Success'); 

    }, 
    failure: function (response, options) { 
     Ext.MessageBox.alert('Failed', 'Unable to get'); 
    } 

}); 
});   
</script> 
+0

以下線程在Ext.NET論壇可能有助於解決問題:http://forums.ext.net/showthread.php?18136-Ext-is-not-defined –

回答

0

我剛剛找到鏈接。我們可以在cshtml中鏈接ext-base和ext-all。

<script type="text/javascript" src="http://extjs-public.googlecode.com/svn/tags/ext-2.2/release/adapter/ext/ext-base.js"></script> 
<script type="text/javascript" src="http://extjs-public.googlecode.com/svn/tags/ext-2.2/release/ext-all.js"></script>