Sunday, 9 March 2014

set checkbox list selection based on the DB values

  try
            {
string DBVal="1,2,3,";
                if (DBVal != "")
                {
                    string[] str = DBVal.Split(',');
                    foreach (var i in str)
                    {
                        ChkBoxList.Items.FindByValue(i).Selected = true;
                    }
                }
            }
            catch { }

No comments:

Post a Comment

Extracting Nupkg files using command line

Rename it to zip first then extract files as below 1.     Rename-Item -Path A_Package.nupkg -NewName A_Package.zip 2.     Make sure to repla...