Wednesday, 8 June 2011

How to Add Image to Sharepoint 2010 Visual Web part

  • 1- Open your Visual Web Part project
  • 2- Right click on the project name
  • 3- Point to “Add menu”
  • 4- And click on “SharePoint  Images Mapped Folder”

  • 5- Now you will have an “Image” folder and inside it you will have a sub folder named as your project name.
  • 6- Inside the sub folder you can add your images
  • 7- From your web part page “ascx” add an Image (HTML or Standard) control.
  • 8- In properties menu click on “Image URL” or “Src”
  • 9- A popup form will open “Select Image”
  • The image url as like this '~/_layouts/images/UserRoleVisualSugn/1696924227.png'