Assalamualaykum Wr Br…Today we explore the Simple Web Application which allows you to upload image, stores it in DB and finally provides another form which allows to select image which displays in pictureBox.
Lets Quick Start our tour by designing our Form as shown below:
The Browse Button_Click Event code can be demonstrate by the following image as shown below:
The Save Button_Click Event code can be shown in following image as:
The Photos Button creates an instance of the Form2 and calls object.Show method which populates Form2 in Action whose Design contains a ListBox Where Images which stored in DB are populated and based on the selection of the items in ListBox its corresponding image is displayed in PictureBox which is depicted in following images:
The Code for the Form_load event is shown below:
The code for the SelectedIndexChanged event of ListBox is shown below:
The output of the above code is show below as:
Form2 will be displayed as:
Alhamdulliah…Thats all For the Day…Keep Doing It till You Master!!!