Tuesday 8 January 2019

MVC View Pageload Column Set Readonly Method


要先在.js script pageload導入時,就先宣告

$(document).ready(function (){
  xxx
}

例如上方的xxx 可放入
var strFinAccountInd = '@Model.OrdersReissueTkts.Where(x => x.ID_SEQ == @ViewBag.ORTID_SEQ).First().FinAccountInd';

然後strFinAccountInd 才能拿去下方相關 if條件式進行使用

if (strFinAccountInd == "Y") {         
                $("#PAX_ID").attr("readonly", true);
            }

No comments:

Post a Comment

找不到匯入的專案  請確認 <Import> 宣告中的路徑正確,而且檔案存在於磁碟上。

【Problem】  C:\inetpub\wwwroot\project\project.csproj : error  : 找不到匯入的專案 "C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v12.0\W...