How to put/set/add on image button in


You can set image to a image button in two ways in visual studio. In the first way you have to manually add the image url in image button tag as shown in following syntax.

 HTML |  copy code |? 
<asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/imageUI/Rectangular_Preview_P.png" 

In the second way is the GUI based visual studio feature where you have to select image button and right click on the image button and select the properties and there select the image url properties the a new pop up window will open as shown below then navigate to your image in the explorer of the window and press ok and you are done.

Leave a Comment

Your email address will not be published.