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 Default2 : System.Web.UI.Page { 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 if (Request.QueryString["typeID"] != null && Request.QueryString["isnew"] != null) { string strType = Request.QueryString["typeID"]; string strIsNew = Request.QueryString["isnew"]; AccessDataSource2.SelectCommand = "SELECT * FROM [events] WHERE isNew=" + strIsNew + " AND eventTypeId=" + strType + " ORDER BY [Date] DESC"; } else { AccessDataSource2.SelectCommand = "SELECT * FROM [events]"; } } } }