您好,登錄后才能下訂單哦!
在做asp.net mvc的項(xiàng)目時(shí),用到了ajax,本人習(xí)慣用ashx(一般處理程序)處理數(shù)據(jù),在進(jìn)行編譯的時(shí)候出現(xiàn)了以下錯(cuò)誤:
錯(cuò)誤1:命名空間不能直接包含字段或方法之類的成員
錯(cuò)誤2:原義說明符 @ 之后應(yīng)為關(guān)鍵字、標(biāo)識(shí)符或字符串
英文釋義為:
error 1: A namespace cannot directly contain members such as fields or methods
error 2: Keyword, identifier, or string expected after verbatim specifier: @
搜索了很久,終于在stackflow上找到了一個(gè)答案,英文原文是:
I figured it out... The ashx file itself was set to compile, changed it to content and compile only the cs file and it builds..
英文不是很難,就是說把a(bǔ)shx文件的屬性改為“內(nèi)容”,ashx.cs文件的屬性改為“編譯即可”,測試之后一切可以正常使用。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。