ExecuteReader: Connection property has not been initialized

前端 未结 7 1485
广开言路
广开言路 2021-01-01 08:29

ExecuteReader: Connection property has not been initialized.

my coding is

protected void Button2_Click(object sender,          


        
7条回答
  •  感动是毒
    2021-01-01 09:31

    use this and pass connection object :

     SqlCommand cmd=new SqlCommand ("insert into time(project,iteration)values('"+this .name1 .SelectedValue +"','"+this .iteration .SelectedValue +"')",conn);
    

提交回复
热议问题