Hi,
I have the following method which is called by many of my pages within my application:
[DataObjectMethod(DataObjectMethodType.Select)]
public static List GetProducts()
{
MySqlConnection connection = new MySqlConnection(GetConnectionString());
MySqlCommand command = connection.CreateCommand();
command.CommandText = @"SELECT PID, ProductID, ProductName, ProductDesc,
IFNULL(ProductImage,'no_image.jpg') AS ProductImage,
SubID, CatID, BrandID FROM `product`";
connection.Open();
MySqlDataReader dr = command.ExecuteReader(CommandBehavior.CloseConnection);
List ProductList = new List();
while (dr.Read())
{
Product product = Go to the complete details ...