Example #1
0
        private void BindTestName()
        {
            try
            {
                DataTable tblCat = new TestBLL().GetAllTest();
                DataRow   dr     = tblCat.NewRow();
                dr["TestId"]   = 0;
                dr["TestName"] = "---Select---";
                tblCat.Rows.InsertAt(dr, 0);

                ddlTestName.DataSource     = tblCat;
                ddlTestName.DataValueField = "TestId";
                ddlTestName.DataTextField  = "TestName";
                ddlTestName.DataBind();
            }
            catch (Exception ex)
            {
                //  lblMessage.Text = ex.Message;
            }
        }