how to prevent dublicate record on run time
<p>This code cause double record...
i checked my insert code for all tables and it works fine...</p>

<p>and this is insert code:</p>

<pre><code>        StoreDO store = new StoreDO();
        List&lt;BrandDO&gt; brandList = new BrandBL().SelectBrands();
        StoreBL storeBL = new StoreBL();

        store.StoreName = txtStoreName.Text;
        store.StorePhone = txtStorePhone.Text;
        store.StoreAddress = txtStoreAddress.Text;
        store.CityID = int.Parse(ddlCity.SelectedValue);
        store.CountyID = int.Parse(ddlCounty.SelectedValue);
        store.IsActive = chkIsActive.Checked;
        int storeID = storeBL.InsertStore(store);
        ContentPlaceHolder contentPlaceHolder = (ContentPlaceHolder)Master.FindControl("ContentPlaceHolder1");
        for (int i = 0; i &lt; brandList.Count; i++) {
            string brandName = brandList[i].BrandName.ToString() + brandList[i].BrandID.ToString();
            StoreBrandBL storeBrandBL = new StoreBrandBL();
            CheckBox chkBrand = (CheckBox)contentPlaceHolder.FindControl(brandName);
            if (chkBrand != null) {
                if (chkBrand.Checked) {
                    StoreBrandDO storeBrandDO = new StoreBrandDO();
                    storeBrandDO.StoreID = storeID;
                    storeBrandDO.BrandID = brandList[i].BrandID;
                    storeBrandDO.IsActive = true;
                    storeBrandBL.InsertStoreBrand(storeBrandDO);
                }
            }
        }
</code></pre>

<p>thank you...</p>
