Users Pricing

forum

Home Forums binding dropdownlist – MindStick

binding dropdownlist

Anonymous User 1791 05 Sep 2014

I have a Class in the App_code folder that contain Method like this:

public static  GetAllCustomers()
{
    string conn = ConfigurationManager.ConnectionStrings["ConnectToDB"].ConnectionString;
    using (SqlConnection connection= new SqlConnection(conn))
    {
        using (SqlCommand cmd = new SqlCommand())
        {
            cmd.CommandText = "select C_ID,L_ID,C_Name from Customer";
            cmd.Connection = connection;
            connection.Open();
        }
    }
    return;


1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md