consider ur having 5 checkbox with ids as id=check1, id=check2 ...... and let there text be set to text="name",text="surname", and text="rollno" these text and the fields name in the database must be same assume that ur having a button with its id="bsubmit" now consider a scenario in which user has just checked checkbox1 and checkbox3 means check1 and check3 are checked now declare an array in code behind in vb like dim arr as arraylist dim i as integer and in bsubmit button write this code if(check1.checked) { arr[i]= check1.text i++ } if(check2.checked) { arr[i]= check2.text i++ } .... and so on now in this scenario we will have the array elements as "name" and "rollno" now at the last just check the length of array and write a query for that much element. for further queries mail me or call me