protected void cpPhoto_Callback(object sender, CallbackEventArgsBase e) { BootstrapCallbackPanel cp = sender as BootstrapCallbackPanel; BootstrapBinaryImage img = cp.FindControl("imgPhoto") as BootstrapBinaryImage; img.Value = Session["DriverPhotoImageBytes"]; }
protected void gv_HtmlDataCellPrepared(object sender, BootstrapGridViewTableDataCellEventArgs e) { if (e.DataColumn.FieldName == "ImageBytes") { BootstrapBinaryImage imgPhotoGrid = gv.FindRowCellTemplateControl(e.VisibleIndex, gv.Columns["ImageBytes"] as GridViewDataColumn, "imgPhotoGrid") as BootstrapBinaryImage; imgPhotoGrid.Value = e.CellValue; } }
protected void imgPhoto_Init(object sender, EventArgs e) { BootstrapBinaryImage img = sender as BootstrapBinaryImage; if (!gv.IsNewRowEditing) { img.Value = (byte[])gv.GetRowValues(gv.EditingRowVisibleIndex, "ImageBytes"); } }