You should Google for 'asp.net photo gallery': http://geekswithblogs.net/omtalsania7/archive/2012/12/27/how-to-create-an-image-grid-with-asp.net-44.5-using.aspx
You could put a counter in the template or code to break up the galleries with 9 images.