Click here to Skip to main content
15,881,938 members
Articles / Web Development / HTML

AJAX DataGrid

Rate me:
Please Sign up or sign in to vote.
4.57/5 (23 votes)
5 Jun 20074 min read 110.2K   2K   105  
This article demonstrates the use of the AJAX technique in tandem with the JavaScript DataGrid from my previous article.
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

namespace AndrewGolik.DaoTraining.DataAccessLayer 
{
    public abstract class DaoFactory 
    {

        public abstract  CustomerDao  GetCustomerDao();
        public abstract  OrderDao   GetOrderDao();
       

       
       
        public static DaoFactory GetDaoFactory()
        {
            string strDaoFactoryType = ConfigurationManager.AppSettings["DaoFactory"];
            if (String.IsNullOrEmpty(strDaoFactoryType))
                throw new NullReferenceException("DaoFactory type configuration is missing from your web.config.");

            else
            {
                Type DaoFactoryType = Type.GetType(strDaoFactoryType);
                if (DaoFactoryType == null)
                    throw new NullReferenceException("DaoFactory type can not be found.");

                Type DaoFactoryBaseType = Type.GetType("AndrewGolik.DaoTraining.DataAccessLayer.DaoFactory");
                if (!DaoFactoryBaseType.IsAssignableFrom(DaoFactoryType))
                    throw new ArgumentException("DaoFactory type does not inherits from AndrewGolik.DaoTraining.DataAccessLayer.DaoFactory.");


                DaoFactory daoFactory = (DaoFactory)Activator.CreateInstance(DaoFactoryType);
                return daoFactory;
            }
            
        }
         
       


    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
Belarus Belarus
Andrew Golik is a software professional working in Minsk, Belarus.
He enjoys design infrastructures based on object oriented paradigm. His programming experience includes ASP, ASP.NET, .NET, COM, JAVA, PHP, DHTML, AJAX, blah blah blah....

Andrew Golik's Blog

Comments and Discussions