Monday, March 10, 2014

MVC CheckBoxFor value set from script

If we want to set value in CheckBoxFor value from script we can set value like this:

  function EditAccessPrevilige(AccessPrivilegeID, LoginID, EmployeeAccessPrivilege, PayrollPrivilege) {  
     $('#AccessPrivilegeInfo_LoginID').val(LoginID);  
     if (EmployeeAccessPrivilege == "True")  
       document.getElementById("AccessPrivilegeInfo_EmployeeAccessPrivilege").checked = true;  
     else  
       document.getElementById("AccessPrivilegeInfo_EmployeeAccessPrivilege").checked = false;  
     if (PayrollPrivilege == "True")  
       document.getElementById("AccessPrivilegeInfo_PayrollPrivilege").checked = true;  
     else  
       document.getElementById("AccessPrivilegeInfo_PayrollPrivilege").checked = false;  
     return false;  
   }  

C# print file on LAN Printer

If you want to print any file on network printer then you can try with this code block // Change Default Printer System.Ma...