Skip to main content

Posts

Showing posts from March, 2018

Featured Post

How to use Tabs in ASP.NET CORE

I want to show Components in a tabs , so first of all create few components. In this project we have three components, First View Component  public class AllViewComponent : ViewComponent     {         private readonly UserManager<ApplicationUser> _userManager;         public AllViewComponent(UserManager<ApplicationUser> userManager)         {             _userManager = userManager;         }         public async Task<IViewComponentResult> InvokeAsync()         {             List<StudentViewModel> allUsers = new List<StudentViewModel>();             var items = await _userManager.Users.ToListAsync();             foreach (var item in items)             {                 allUsers.Add(new StudentViewModel {Id=item.Id, EnrollmentNo = item.EnrollmentNo, FatherName = item.FatherName, Name = item.Name, Age = item.Age, Birthdate = item.Birthdate, Address = item.Address, Gender = item.Gender, Email = item.Email });             }            

Save and Display Binary Images from Database in DataGridView in Windows Forms

In this article, I am going to show you, How to show images in DataGridView in Windows forms c#. Its easy to bind the DataGridView with the database table which is contain binary image. You can check this code to bind the DataGridView with the image using Entity Framework. using System; using System.IO; using System.Linq; using System.Windows.Forms; namespace BankingApplication_Tutorial {     public partial class Form4 : Form     {         public Form4()         {             InitializeComponent();         }         private void Form4_Load(object sender, EventArgs e)         {             dataGridView1.AutoGenerateColumns = false;             dataGridView1.ColumnCount = 2;             dataGridView1.Columns[0].Name = "Id";             dataGridView1.Columns[0].HeaderText = "Image Id";             dataGridView1.Columns[0].DataPropertyName = "Id";             dataGridView1.Columns[1].Name = "Name";             dataGridVie