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) {  
     if (EmployeeAccessPrivilege == "True")  
       document.getElementById("AccessPrivilegeInfo_EmployeeAccessPrivilege").checked = true;  
       document.getElementById("AccessPrivilegeInfo_EmployeeAccessPrivilege").checked = false;  
     if (PayrollPrivilege == "True")  
       document.getElementById("AccessPrivilegeInfo_PayrollPrivilege").checked = true;  
       document.getElementById("AccessPrivilegeInfo_PayrollPrivilege").checked = false;  
     return false;  

SQL Get all Index create script from Database

To get all script from database as a create new index into another database you can use the following --Get all Index Script SELECT...