Click here to Skip to main content
15,918,889 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
 private void button1_click(object sender , EventArgs e)
{
sql connection Conn= new sql connection("Server=. ; DataBase=BooksDB ; Integrated Security =True");
sqlCommand Comm =  new sqlCommand ("Delete From Books Where Author = N'"+cbxAuthor.SelectedValue + "'" , conn);
conn.open();
Comm.ExecuteNonQuery();
MessageBox.Show("Sucess");
conn.Close();
} 
.
Posted

After the delete operation, bind the combobox again
 
Share this answer
 
v2
Comments
EngMamdouhAlsayed 25-Feb-14 7:45am    
How ? Can you Write The Code Line For Me?
Tom Marvolo Riddle 25-Feb-14 7:57am    
5!
Obviously Somewhere you have written the code to bind that combobox when your page is loaded.

You just need to check the dialog result and if it is OK then REBIND your combobox by calling the same method you have written to bind it first time.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900