private void PopulateProfileType(string UserId, object selectedProfileType = null) { var query = ems.GetProfileTypeList(UserId); SelectList ProfileTypeList = new SelectList(query, "ProfileId", "ProfileName", selectedProfileType); ViewBag.ProfileId = ProfileTypeList; }