I guess I need to write code in this button click event to get my desired output, but unable write down the steps. Any help from you guys would be helpful and will make me learn. Thank you.
private void btnViewAllEntries_Click(object sender, EventArgs e)
{
SqlConnection con = new SqlConnection(Helper.ConnectionString);
SqlCommand cmd = new SqlCommand("Select * from DirDetails");
con.Open();
con.Close();
MessageBox.Show(DetailsView.cs);//DetailsView.cs is winform with gridview
}
First of all,
MessageBoxjust shows messages, notForms.To show a Form you should instantiate it and use
ShoworShowDialogmethods.Second, run the query in the
DetailsView.cs