multiple insert value

Oct 25 2013 7:34 AM
HI
I want to insert multiple values of checkbox list in single column seperated by comma.my insert code is
---------------------------------------
SQL CODE
Insert into PR_LWFSetting(SrNo, MonApp ) Select SrNo, MonApp From OPENXML (@DocPR_LWFSetting, '/PR_LWFSetting/Row',2) 
WITH ( SrNo int 'SrNo',
        MonApp varchar(50) 'MonApp'              ) 
------------------------------------------
ASP .NET
save code
 xmlPR_LWFSetting.Append("<MonApp>");
xmlPR_LWFSetting.Append(SelectedValue);
  //xmlPR_LWFSetting.Append(this.chkMonth.SelectedValue)xmlPR_LWFSetting.Append("</MonApp>");
where code for SelectedValue is 
 string SelectedValue = string.Empty, blankValue = string.Empty;
        foreach (ListItem item in chkMonth.Items)
        {
            if (item.Selected)
            {
                SelectedValue += item.Value + ",";
            }
            else
            {
                blankValue += item.Value + ",";
            }
        }
I am getting an error 
Conversion failed when converting the varchar value '1,2,' to data type int

Answers (1)