How to use ImageButton Control in asp.net

1.File-> New-> Website->  ASP.NET Web Site(Visual C#) -> Ok

(Now You will see a Default.aspx page. To create your own page->click on dropdown list below Edit->click Add new item->Select Web Form->click Add)


2.Solution Explorer->Right click on Project name->Click New Folder->name this folder as Images and add your desired image in this folder














3.ToolBox->Double click on ImageButton->Right click on ImageButton->select properties-> Click ImageUrl Properties->you will prompt a pop up window like this->select your desired image->ok
You will prompt a pop up window like this->select your desired image->ok
 4.Right Click on ImageButton->select Properties->click Events->double click on click Events(to get code behind)

And write this code

5.Click F5 to run your project
 

No comments:

Post a Comment