using System; using System.Data; using System.Configuration; using System.Collections; 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; public partial class UserControls_AdsCtrll : System.Web.UI.UserControl { protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { //Set the db file AccessDataSource2.DataFile = ConfigurationManager.AppSettings["DataFile"]; //"~/database/ecodb.mdb"; //Select command with new events and eventTypeId=1--> Our news AccessDataSource2.SelectCommand = "SELECT * FROM [ads]";// WHERE isNew=1 AND eventTypeId=1"; } } }