protected void ImageBind() { List <WMGoodImages> list = WMGoodImages.GetList(Id); ImageRepeater.DataSource = list; ImageRepeater.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { var db = new DAL.DummyDb(); var destinations = db.GetDestinations(); ImageRepeater.DataSource = destinations; ImageRepeater.DataBind(); } }
protected void Page_Load(object sender, EventArgs e) { if ((Session["AdminUser_ID"] == null || Session["AdminUser_ID"].ToString().CompareTo("") == 0)) { Response.Redirect("Login.aspx"); } else { if (page_right_check()) { if (!Page.IsPostBack) { if (Request.QueryString["productid"] != null || Request.QueryString["buyingleadid"] != null) { sqlParams = new SqlParameter[2]; sqlParams[0] = new SqlParameter("@flag", "1"); if (Request.QueryString["productid"] != null) { sqlParams[1] = new SqlParameter("@productid", Request.QueryString["productid"]); } else if (Request.QueryString["buyingleadid"] != null) { sqlParams[1] = new SqlParameter("@buyingleadid", Request.QueryString["buyingleadid"]); } ds = access.GetDataSet("AdminViewPhoto", CommandType.StoredProcedure, sqlParams); if (ds.Tables[0].Rows.Count > 0) { ImageRepeater.DataSource = ds; ImageRepeater.DataBind(); } else { Response.Write("<font color=\"red\">There are images uploaded for the current context</font>"); } } else { Response.Write("<font color=\"red\">There are images uploaded for the current context</font>"); } } } else { Response.Redirect("Welcome.aspx"); } } }
protected void BindAllData() { try { Debug.WriteLine("BindAllDAta"); var result = BL.GetAllActiveProducts(); productList = result.ToList(); ImageRepeater.DataSource = GetDataTable(); ImageRepeater.DataBind(); } catch (Exception e) { e.GetBaseException(); } }
/* * @Method: ImageRepeater_Load * @Params: object sender, EventArgs e * @Return: void * @Description: This method will be activated at the before the images * repeater is loaded to assign the images string as Data Source, and assign * the SqlDataSource at the same time */ protected void ImageRepeater_Load(object sender, EventArgs e) { //Configuring Data Source for all the views string connectionString = ConfigurationManager.ConnectionStrings[dbCommander.sourceString].ConnectionString; string query = "SELECT * FROM Venues INNER JOIN Customers ON Venues.CustomerID = Customers.CustomerID WHERE Venues.VenueID = '"+ Request.QueryString["id"] + "'"; source = new SqlDataSource(connectionString, query); //Getting the array that carries the paths to all images var dataview = (DataView)source.Select(DataSourceSelectArguments.Empty); foreach (DataRowView drv in dataview) { images = GetImages(drv["Images"].ToString()); } //Assigning the array as data source for repeater ImageRepeater.DataSource = images; ImageRepeater.DataBind(); dbCommander.CloseConnection(); }
protected void BindDataByType(string type) { productList = BL.GetProducts(type); ImageRepeater.DataSource = GetDataTable(); ImageRepeater.DataBind(); }