hello everyone!!
i m new to c# and making project on c# window application.I learned a lot from daniweb but now i m stuck in one thing help me to resolve the problem.
database table lib_book_details in which column are tag_id,book_name,author_name.
Now i want to make a search form in which i add tag_id in textbox and the rest data appears as per my search.
Thanks in advance..

This is a copy pasta from an ASP project im working on let me know if its helpful or not.

public static void OrderDetails(GridView gv, int orderID)
    {
        using (SqlConnection conn = new SqlConnection(WebConfigurationManager.ConnectionStrings[sConnNorth].ConnectionString))
        {
            conn.Open();
            using (SqlCommand comm = new SqlCommand("OrderDetails", conn))
            {
                comm.CommandType = CommandType.StoredProcedure;

                SqlParameter param = new SqlParameter("@orderID", orderID);
                param.Direction = ParameterDirection.Input;
                param.SqlDbType = SqlDbType.Int;
                comm.Parameters.Add(param);

                gv.DataSource = comm.ExecuteReader();
                gv.DataBind();
            }
            conn.Close();
        }
    }
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.