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

IIS HTTP Error 403.18

 HTTP Error 403.18 - Forbidden The specified request cannot be processed in the application pool that is configured for this resource on the...